Fix crash with potential missing DWARF structure tag's type name
authorJean-Paul Mari <djipi.mari@gmail.com>
Tue, 19 Mar 2019 03:38:11 +0000 (23:38 -0400)
committerJean-Paul Mari <djipi.mari@gmail.com>
Tue, 19 Mar 2019 03:38:11 +0000 (23:38 -0400)
docs/vj_HistoryNotes.txt
src/debugger/DWARFManager.cpp

index 29d28f7..d3e65c2 100644 (file)
@@ -81,6 +81,7 @@ Git commit: TBD
 -- Added a window to display my own directory and his files list
 44) Debugger sources code clean-up
 45) Fix a crash when emulator, in non-debugger mode, opens the breakpoint UIs at launch
 -- Added a window to display my own directory and his files list
 44) Debugger sources code clean-up
 45) Fix a crash when emulator, in non-debugger mode, opens the breakpoint UIs at launch
+46) Fix crash with potential missing DWARF structure tag's type name
 
 Release 3 (13th November 2017)
 ------------------------------
 
 Release 3 (13th November 2017)
 ------------------------------
@@ -225,7 +226,7 @@ Project information
 3) libelf 0.8.13 library 64bits for VS 2015/2017
 4) libdwarf 1.41 library 64bits for VS 2015, cygwin64 and Msys2/MinGW64
 5) QT 5.5.1 library 64bits for VS 2015
 3) libelf 0.8.13 library 64bits for VS 2015/2017
 4) libdwarf 1.41 library 64bits for VS 2015, cygwin64 and Msys2/MinGW64
 5) QT 5.5.1 library 64bits for VS 2015
-6) QT 5.9.1 library 64bits for VS 2017
+6) QT 5.12.0 library 64bits for VS 2017
 7) Zlib 1.2.8 library 64bits for VS 2015
 8) Zlib 1.2.11 library 64bits for VS 2017
 9) SDL 1.2.15 library 64bits for VS 2015/2017
 7) Zlib 1.2.8 library 64bits for VS 2015
 8) Zlib 1.2.11 library 64bits for VS 2017
 9) SDL 1.2.15 library 64bits for VS 2015/2017
index 4ff8abb..acfe387 100644 (file)
@@ -28,7 +28,7 @@
 \r
 \r
 // Definitions for debugging\r
 \r
 \r
 // Definitions for debugging\r
-//#define DEBUG_NumCU                  0x9                                     // CU number to debug or undefine it\r
+//#define DEBUG_NumCU                  0xf                             // CU number to debug or undefine it\r
 //#define DEBUG_VariableName   "sound_death"                           // Variable name to look for or undefine it\r
 //#define DEBUG_TypeName               "Cbuf_Execute"                  // Type name to look for or undefine it\r
 //#define DEBUG_TypeDef                        DW_TAG_typedef          // Type def to look for or undefine it (not supported)\r
 //#define DEBUG_VariableName   "sound_death"                           // Variable name to look for or undefine it\r
 //#define DEBUG_TypeName               "Cbuf_Execute"                  // Type name to look for or undefine it\r
 //#define DEBUG_TypeDef                        DW_TAG_typedef          // Type def to look for or undefine it (not supported)\r
@@ -1188,7 +1188,10 @@ void DWARFManager_InitInfosVariable(VariablesStruct *PtrVariables)
                                        PtrVariables->TypeTag |= TypeTag_structure;\r
                                        if (!(PtrVariables->TypeTag & TypeTag_typedef))\r
                                        {\r
                                        PtrVariables->TypeTag |= TypeTag_structure;\r
                                        if (!(PtrVariables->TypeTag & TypeTag_typedef))\r
                                        {\r
-                                               strcat(PtrVariables->PtrTypeName, PtrCU[NbCU].PtrTypes[j].PtrName);\r
+                                               if (PtrCU[NbCU].PtrTypes[j].PtrName)\r
+                                               {\r
+                                                       strcat(PtrVariables->PtrTypeName, PtrCU[NbCU].PtrTypes[j].PtrName);\r
+                                               }\r
                                        }\r
                                        if ((TypeOffset = PtrCU[NbCU].PtrTypes[j].TypeOffset))\r
                                        {\r
                                        }\r
                                        if ((TypeOffset = PtrCU[NbCU].PtrTypes[j].TypeOffset))\r
                                        {\r