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
+47) Added ELF sections check so a potential unknown section won't stop the reading
Release 3 (13th November 2017)
------------------------------
\r
\r
// Definitions for debugging\r
-//#define DEBUG_NumCU 0xf // CU number to debug or undefine it\r
+//#define DEBUG_NumCU 0x4d // 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
// --- ---------- ------------------------------------------------------------\r
// JPM Sept./2016 Created this file, and added Soft debugger support\r
// JPM 10/09/2018 Added source file search paths\r
+// JPM 04/06/2019 Added ELF sections check\r
//\r
\r
#include "debuggertab.h"\r
displayHWlabels = new QCheckBox(tr("Display HW labels"));\r
disasmopcodes = new QCheckBox(tr("Display M68000 opcodes"));\r
displayFullSourceFilename = new QCheckBox(tr("Display source filename"));\r
+ ELFSectionsCheck = new QCheckBox(tr("ELF sections check"));\r
disasmopcodes->setDisabled(false);\r
displayHWlabels->setDisabled(false);\r
displayFullSourceFilename->setDisabled(false);\r
+ ELFSectionsCheck->setDisabled(false);\r
\r
layout4->addWidget(disasmopcodes);\r
layout4->addWidget(displayHWlabels);\r
layout4->addWidget(displayFullSourceFilename);\r
+ layout4->addWidget(ELFSectionsCheck);\r
\r
setLayout(layout4);\r
}\r
vjs.displayHWlabels = displayHWlabels->isChecked();\r
vjs.disasmopcodes = disasmopcodes->isChecked();\r
vjs.displayFullSourceFilename = displayFullSourceFilename->isChecked();\r
+ vjs.ELFSectionsCheck = ELFSectionsCheck->isChecked();\r
}\r
\r
\r
displayHWlabels->setChecked(vjs.displayHWlabels);\r
disasmopcodes->setChecked(vjs.disasmopcodes);\r
displayFullSourceFilename->setChecked(vjs.displayFullSourceFilename);\r
+ ELFSectionsCheck->setChecked(vjs.ELFSectionsCheck);\r
}\r
\r
\r
// --- ---------- ------------------------------------------------------------\r
// JPM Sept./2016 Created this file, and added Soft debugger support\r
// JPM 10/09/2018 Added the source file search paths\r
+// JPM 04/06/2019 Added ELF sections check\r
//\r
\r
#ifndef __DEBUGGERTAB_H__\r
QCheckBox *displayHWlabels;\r
QCheckBox *disasmopcodes;\r
QCheckBox *displayFullSourceFilename;\r
+ QCheckBox *ELFSectionsCheck;\r
};\r
\r
#endif // __DEBUGGERTAB_H__\r
// Who When What\r
// --- ---------- ------------------------------------------------------------\r
// JLH 01/16/2010 Created this log ;-)\r
-// JLH 02/28/2010 Added functions to look inside .ZIP files and handle\r
-// contents\r
+// JLH 02/28/2010 Added functions to look inside .ZIP files and handle contents\r
// JLH 06/01/2012 Added function to check ZIP file CRCs against file DB\r
-// JPM 06/06/2016 Visual Studio support\r
-// JPM 06/15/2016 ELF format support\r
-// JPM 06/19/2016 Soft debugger support\r
+// JPM June/2016 Visual Studio support, ELF format support and Soft debugger support\r
// JPM 07/15/2016 DWARF format support\r
+// JPM 04/06/2019 Added ELF sections check\r
//\r
\r
#include "file.h"\r
#include "libdwarf.h"\r
#include "debugger/ELFManager.h"\r
#include "debugger/DBGManager.h"\r
+#include "settings.h"\r
\r
\r
// Private function prototypes\r
else\r
{\r
NameSection = elf_strptr(ElfMem, PtrGElfEhdr->e_shstrndx, (size_t)PtrGElfShdr->sh_name);\r
- WriteLog("FILE: ELF Section name: %s\n", NameSection);\r
+ WriteLog("FILE: ELF Section %s found\n", NameSection);\r
\r
- if ((ElfSectionNameType = ELFManager_GetSectionType(NameSection)) == ELF_NO_TYPE)\r
+ if (((ElfSectionNameType = ELFManager_GetSectionType(NameSection)) == ELF_NO_TYPE) && vjs.ELFSectionsCheck)\r
{\r
- WriteLog("FILE: ELF Section not listed\n");\r
+ WriteLog("FILE: ELF Section %s not recognized\n", NameSection);\r
error = true;\r
}\r
else\r
// JPM Sept./2018 Added the new Models and BIOS handler, a screenshot feature and source code files browsing\r
// JPM Oct./2018 Added search paths in the settings, breakpoints feature, cartdridge view menu\r
// JPM 11/18/2018 Fix crash with non-debugger mode\r
+// JPM 04/06/2019 Added ELF sections check\r
//\r
\r
// FIXED:\r
vjs.disasmopcodes = settings.value("DisasmOpcodes", true).toBool();\r
vjs.displayHWlabels = settings.value("DisplayHWLabels", true).toBool();\r
vjs.displayFullSourceFilename = settings.value("displayFullSourceFilename", true).toBool();\r
+ vjs.ELFSectionsCheck = settings.value("ELFSectionsCheck", false).toBool();\r
vjs.nbrmemory1browserwindow = settings.value("NbrMemory1BrowserWindow", MaxMemory1BrowserWindow).toUInt();\r
settings.endGroup();\r
\r
settings.setValue("NbrDisasmLines", vjs.nbrdisasmlines);\r
settings.setValue("DisasmOpcodes", vjs.disasmopcodes);\r
settings.setValue("displayFullSourceFilename", vjs.displayFullSourceFilename);\r
+ settings.setValue("ELFSectionsCheck", vjs.ELFSectionsCheck);\r
settings.setValue("NbrMemory1BrowserWindow", (unsigned int)vjs.nbrmemory1browserwindow);\r
settings.setValue("DefaultROM", vjs.debuggerROMPath);\r
settings.setValue("SourceFileSearchPaths", vjs.sourcefilesearchPaths);\r
// --- ---------- ------------------------------------------------------------\r
// JPM 06/19/2016 Soft debugger support\r
// JPM Sept./2018 Added the new Models and BIOS handler, and a screenshot settings\r
-// JPM 10/10/2018 Added search paths in settings \r
+// JPM 10/10/2018 Added search paths in settings\r
+// JPM 04/06/2019 Added ELF sections check\r
//\r
\r
#ifndef __SETTINGS_H__\r
bool displayHWlabels;\r
bool useFastBlitter;\r
bool displayFullSourceFilename;\r
+ bool ELFSectionsCheck;\r
size_t nbrmemory1browserwindow; // Number of memory browser windows\r
size_t DRAM_size; // DRAM size\r
\r