From a69ee13f5a5223f00636fbafe583a40eeb9b1f3a Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Wed, 29 Jul 2020 16:33:07 +0100 Subject: [PATCH] For DWARF v5 Dwarf Package Files (.dwp files), the section identifier encodings have changed. This patch updates dwarf2.h to contain the new encodings. (see http://dwarfstd.org/doc/DWARF5.pdf, section 7.3.5). * dwarf2.h (enum dwarf_sect_v5): A new enum section for the sections in a DWARF 5 DWP file (DWP version 5). --- include/ChangeLog | 5 +++++ include/dwarf2.h | 41 +++++++++++++++++++++++++++++------------ 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/include/ChangeLog b/include/ChangeLog index e65e85d1444..035e2b98a65 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2020-07-28 Caroline Tice + + * dwarf2.h (enum dwarf_sect_v5): A new enum section for the + sections in a DWARF 5 DWP file (DWP version 5). + 2020-07-22 Nick Alcock * ctf-api.h (CTF_LINK_NONDEDUP): New, turn off the diff --git a/include/dwarf2.h b/include/dwarf2.h index 882453dce08..bd33e06a75c 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -488,19 +488,36 @@ enum dwarf_unit_type #define DW_EH_PE_indirect 0x80 /* Codes for the debug sections in a dwarf package (.dwp) file. - Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFissionDWP. */ + (From the pre-standard formats Extensions for Fission. + See http://gcc.gnu.org/wiki/DebugFissionDWP). */ enum dwarf_sect - { - DW_SECT_INFO = 1, - DW_SECT_TYPES = 2, - DW_SECT_ABBREV = 3, - DW_SECT_LINE = 4, - DW_SECT_LOC = 5, - DW_SECT_STR_OFFSETS = 6, - DW_SECT_MACINFO = 7, - DW_SECT_MACRO = 8, - DW_SECT_MAX = 8 - }; +{ + DW_SECT_INFO = 1, + DW_SECT_TYPES = 2, + DW_SECT_ABBREV = 3, + DW_SECT_LINE = 4, + DW_SECT_LOC = 5, + DW_SECT_STR_OFFSETS = 6, + DW_SECT_MACINFO = 7, + DW_SECT_MACRO = 8, + DW_SECT_MAX = 8 +}; + +/* Codes for the debug sections in a dwarf package (.dwp) file. + (From the official DWARF v5 spec. + See http://dwarfstd.org/doc/DWARF5.pdf, section 7.3.5). */ +enum dwarf_sect_v5 +{ + DW_SECT_INFO_V5 = 1, + DW_SECT_RESERVED_V5 = 2, + DW_SECT_ABBREV_V5 = 3, + DW_SECT_LINE_V5 = 4, + DW_SECT_LOCLISTS_V5 = 5, + DW_SECT_STR_OFFSETS_V5 = 6, + DW_SECT_MACRO_V5 = 7, + DW_SECT_RNGLISTS_V5 = 8, + DW_SECT_MAX_V5 = 8 +}; #ifdef __cplusplus extern "C" { -- 2.30.2