From c3b14e59de00af442362e915076a741f910f0248 Mon Sep 17 00:00:00 2001 From: Jean-Paul Mari Date: Sun, 15 Mar 2020 05:24:50 -0400 Subject: [PATCH] Added ELF & DWARF .debug* types --- docs/vj_HistoryNotes.txt | 1 + src/debugger/ELFManager.cpp | 20 +++++++++++++------- src/debugger/ELFManager.h | 21 +++++++++++++-------- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/docs/vj_HistoryNotes.txt b/docs/vj_HistoryNotes.txt index 304a98e..8f788cb 100644 --- a/docs/vj_HistoryNotes.txt +++ b/docs/vj_HistoryNotes.txt @@ -12,6 +12,7 @@ Release 5 (TBA) 5) Added a specific breakpoint for the M68K Unimplemented instruction, and Exception not referenced exceptions 6) Fix potential emulator freeze after an exception has occured 7) Fix a random crash when reading the source lines information +8) Added ELF & DWARF .debug* types Release 4a (15th August 2019) ----------------------------- diff --git a/src/debugger/ELFManager.cpp b/src/debugger/ELFManager.cpp index 3624653..421e3e3 100644 --- a/src/debugger/ELFManager.cpp +++ b/src/debugger/ELFManager.cpp @@ -10,6 +10,7 @@ // JPM Jan./2016 Created this file and added ELF format support // JPM 07/13/2017 ELF DWARF format support improvement // JPM 10/20/2018 Added function name support from ELF structure +// JPM 03/13/2020 Added ELF & DWARF .debug* types // #include @@ -48,18 +49,23 @@ ELFSectionType ELFTabSectionType[] = { { ".data", ELF_data_TYPE }, { ".bss", ELF_bss_TYPE }, { ".heap", ELF_heap_TYPE }, + { ".debug", ELF_debug_TYPE }, + { ".comment", ELF_comment_TYPE }, + { ".shstrtab", ELF_shstrtab_TYPE }, + { ".symtab", ELF_symtab_TYPE }, + { ".strtab", ELF_strtab_TYPE }, + { ".debug_abbrev", ELF_debug_abbrev_TYPE }, { ".debug_aranges", ELF_debug_aranges_TYPE }, + { ".debug_frame", ELF_debug_frame_TYPE }, { ".debug_info", ELF_debug_info_TYPE }, - { ".debug_abbrev", ELF_debug_abbrev_TYPE }, { ".debug_line", ELF_debug_line_TYPE }, - { ".debug_frame", ELF_debug_frame_TYPE }, - { ".debug_str", ELF_debug_str_TYPE }, { ".debug_loc", ELF_debug_loc_TYPE }, + { ".debug_macinfo", ELF_debug_macinfo_TYPE }, + { ".debug_pubnames", ELF_debug_pubnames_TYPE }, + { ".debug_pubtypes", ELF_debug_pubtypes_TYPE }, { ".debug_ranges", ELF_debug_ranges_TYPE }, - { ".comment", ELF_comment_TYPE }, - { ".shstrtab", ELF_shstrtab_TYPE }, - { ".symtab", ELF_symtab_TYPE }, - { ".strtab", ELF_strtab_TYPE } + { ".debug_str", ELF_debug_str_TYPE }, + { ".debug_types", ELF_debug_types_TYPE } }; diff --git a/src/debugger/ELFManager.h b/src/debugger/ELFManager.h index 7b03bfc..23c137f 100644 --- a/src/debugger/ELFManager.h +++ b/src/debugger/ELFManager.h @@ -12,18 +12,23 @@ typedef enum { ELF_data_TYPE, ELF_bss_TYPE, ELF_heap_TYPE, - ELF_debug_aranges_TYPE, - ELF_debug_info_TYPE, - ELF_debug_abbrev_TYPE, - ELF_debug_line_TYPE, - ELF_debug_frame_TYPE, - ELF_debug_str_TYPE, - ELF_debug_loc_TYPE, - ELF_debug_ranges_TYPE, + ELF_debug_TYPE, ELF_comment_TYPE, ELF_shstrtab_TYPE, ELF_symtab_TYPE, ELF_strtab_TYPE, + ELF_debug_abbrev_TYPE, // Abbreviations used in the .debug_info section + ELF_debug_aranges_TYPE, // Lookup table for mapping addresses to compilation units + ELF_debug_frame_TYPE, // Call frame information + ELF_debug_info_TYPE, // Core DWARF information section + ELF_debug_line_TYPE, // Line number information + ELF_debug_loc_TYPE, // Location lists used in the DW_AT_location attributes + ELF_debug_macinfo_TYPE, // Macro information + ELF_debug_pubnames_TYPE, // Lookup table for mapping object and function names to compilation units + ELF_debug_pubtypes_TYPE, // Lookup table for mapping type names to compilation units + ELF_debug_ranges_TYPE, // Address ranges used in the DW_AT_ranges attributes + ELF_debug_str_TYPE, // String table used in .debug_info + ELF_debug_types_TYPE, // Type descriptions ELF_END_TYPE }ELFSECTIONTYPE; -- 2.20.1