Added detection for the unsigned/signed short type
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / DBGManager.cpp
index 3dcb138..1d024e3 100644 (file)
@@ -12,6 +12,7 @@
 // JPM              Various efforts to set the DWARF format support\r
 // JPM  09/15/2018  Support the unsigned char\r
 // JPM   Oct./2018  Cosmetic changes, added source file search paths, and ELF function name\r
+// JPM  Sept./2019  Support the unsigned/signed short type\r
 //\r
 \r
 // To Do\r
@@ -43,8 +44,10 @@ struct Value
                bool B;\r
                double D;\r
                float F;\r
+               int16_t SS;\r
                int32_t SI;\r
                int64_t SL;\r
+               uint16_t US;\r
                uint32_t UI;\r
                uint64_t UL;\r
        };\r
@@ -503,6 +506,10 @@ char *DBGManager_GetVariableValueFromAdr(size_t Adr, size_t TypeEncoding, size_t
                case DBG_ATE_signed:\r
                        switch (TypeByteSize)\r
                        {\r
+                       case 2:\r
+                               sprintf(value, "%i", V.SS);\r
+                               break;\r
+\r
                        case 4:\r
                                sprintf(value, "%i", V.SI);\r
                                break;\r
@@ -522,6 +529,10 @@ char *DBGManager_GetVariableValueFromAdr(size_t Adr, size_t TypeEncoding, size_t
                case DBG_ATE_unsigned:\r
                        switch (TypeByteSize)\r
                        {\r
+                       case 2:\r
+                               sprintf(value, "%u", V.US);\r
+                               break;\r
+\r
                        case 4:\r
                                sprintf(value, "%u", V.UI);\r
                                break;\r