X-Git-Url: http://git.hcoop.net/clinton/Virtual-Jaguar-Rx.git/blobdiff_plain/695f52e357d6a78ebdd05a471cd726ffab2145b0..96aa54e4962989f3dd8ace23c2658a35c4e3cace:/src/debugger/DBGManager.cpp diff --git a/src/debugger/DBGManager.cpp b/src/debugger/DBGManager.cpp index d86ecf9..a2f358d 100644 --- a/src/debugger/DBGManager.cpp +++ b/src/debugger/DBGManager.cpp @@ -4,6 +4,7 @@ // by Jean-Paul Mari // // JPM = Jean-Paul Mari +// RG = Richard Goedeken // // WHO WHEN WHAT // --- ---------- ------------------------------------------------------------ @@ -13,6 +14,8 @@ // JPM 09/15/2018 Support the unsigned char // JPM Oct./2018 Cosmetic changes, added source file search paths, and ELF function name // JPM Aug./2019 Added new functions mainly for source text lines +// JPM Sept./2019 Support the unsigned/signed short type +// RG Jan./2021 Linux build fixes // // To Do @@ -23,11 +26,11 @@ #include #include #include -#include "libelf/libelf.h" -#include "libelf/gelf.h" +#include "libelf.h" +#include "gelf.h" #include "log.h" #include "ELFManager.h" -#include "DwarfManager.h" +#include "DWARFManager.h" #include "DBGManager.h" #include "HWLABELManager.h" #include "settings.h" @@ -44,8 +47,10 @@ struct Value bool B; double D; float F; + int16_t SS; int32_t SI; int64_t SL; + uint16_t US; uint32_t UI; uint64_t UL; }; @@ -211,11 +216,11 @@ size_t DBGManager_GetType(void) // Get source filename based on the memeory address // return NULL if no source filename -char *DBGManager_GetFullSourceFilenameFromAdr(size_t Adr, bool *Error) +char *DBGManager_GetFullSourceFilenameFromAdr(size_t Adr, DBGstatus *Status) { if ((DBGType & DBG_ELFDWARF)) { - return DWARFManager_GetFullSourceFilenameFromAdr(Adr, Error); + return DWARFManager_GetFullSourceFilenameFromAdr(Adr, (DWARFstatus *)Status); } else { @@ -504,6 +509,10 @@ char *DBGManager_GetVariableValueFromAdr(size_t Adr, size_t TypeEncoding, size_t case DBG_ATE_signed: switch (TypeByteSize) { + case 2: + sprintf(value, "%i", V.SS); + break; + case 4: sprintf(value, "%i", V.SI); break; @@ -523,6 +532,10 @@ char *DBGManager_GetVariableValueFromAdr(size_t Adr, size_t TypeEncoding, size_t case DBG_ATE_unsigned: switch (TypeByteSize) { + case 2: + sprintf(value, "%u", V.US); + break; + case 4: sprintf(value, "%u", V.UI); break; @@ -537,7 +550,7 @@ char *DBGManager_GetVariableValueFromAdr(size_t Adr, size_t TypeEncoding, size_t break; case DBG_ATE_unsigned_char: - sprintf(value, "%u", (unsigned int(V.C))); + sprintf(value, "%u", (unsigned int) V.C); break; case DBG_ATE_ptr: