From ef0da6debd1fc73d0f4c3914e21d9a09dd8fe7e7 Mon Sep 17 00:00:00 2001 From: Jean-Paul Mari Date: Wed, 2 Oct 2019 15:57:15 -0400 Subject: [PATCH] Added detection for the unsigned/signed short type --- docs/vj_HistoryNotes.txt | 2 ++ src/debugger/DBGManager.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/vj_HistoryNotes.txt b/docs/vj_HistoryNotes.txt index 5434541..9efa614 100644 --- a/docs/vj_HistoryNotes.txt +++ b/docs/vj_HistoryNotes.txt @@ -7,6 +7,8 @@ Release 5 (TBA) 2) Added a specific breakpoint for the M68K address error exception -- Alert box will display a message and then the code will stop 3) Added a HW registers browser window and set a tab for the Blitter +4) Added detection for the unsigned/signed short type +-- Will allow the return of a short type variable's value Release 4a (15th August 2019) ----------------------------- diff --git a/src/debugger/DBGManager.cpp b/src/debugger/DBGManager.cpp index 3dcb138..1d024e3 100644 --- a/src/debugger/DBGManager.cpp +++ b/src/debugger/DBGManager.cpp @@ -12,6 +12,7 @@ // JPM Various efforts to set the DWARF format support // JPM 09/15/2018 Support the unsigned char // JPM Oct./2018 Cosmetic changes, added source file search paths, and ELF function name +// JPM Sept./2019 Support the unsigned/signed short type // // To Do @@ -43,8 +44,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; }; @@ -503,6 +506,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; @@ -522,6 +529,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; -- 2.20.1