Add code for processing version 5 DWP files (for use with DWARF v5).
authorCaroline Tice <cmtice@google.com>
Fri, 7 Aug 2020 00:16:45 +0000 (17:16 -0700)
committerCaroline Tice <cmtice@google.com>
Fri, 7 Aug 2020 13:53:03 +0000 (06:53 -0700)
commitd2854d8d5a82946ace7f5b626f19c2b73f86d1f6
tree06e90569161108233607d827001f9e2877b1ce49
parent7bb178ecf80918d664954c5f2be911d07afae474
Add code for processing version 5 DWP files (for use with DWARF v5).

The DWARF v5 Spec describes a (slightly) new format for V5 .dwp files.
    This patch updates GDB to allow it to read/process .dwp files in the
    new DWARF v5 format, while continuing to be able to read/process .dwp files
    in the older V1 & V2 formats (older, pre-standard formats).

    The two major differences between the V2 and the V5 format are:
        - The inclusion of DWARF-v5-specific sections:
              .debug_loclists.dwo
              .debug_rnglists.dwo
        - The .dwp section identifier encodings have changed.  The table below
          shows the old & new encodings.  Notice the re-purposing of 5, 7 & 8
          in particular.

    Val  DW4 section       DW4 section id  DW5 section         DW5 section id
    --- -----------------  --------------  -----------------   --------------
     1  .debug_info.dwo    DW_SECT_INFO    .debug_info.dwo     DW_SECT_INFO
     2  .debug_types.dwo   DW_SECT_TYPES         --              reserved
     3  .debug_abbrev.dwo  DW_SECT_ABBREV  .debug_abbrev.dwo   DW_SECT_ABBREV
     4  .debug_line.dwo    DW_SECT_LINE    .debug_line.dwo     DW_SECT_LINE
     5  .debug_loc.dwo     DW_SECT_LOC     .debug_loclists.dwo DW_SECT_LOCLISTS
     6  .debug_str_offsets.dwo             .debug_str_offsets.dwo
                           DW_SECT_STR_OFFSETS                 DW_SECT_STR_OFFSETS
     7  .debug_macinfo.dwo DW_SECT_MACINFO .debug_macro.dwo    DW_SECT_MACRO
     8  .debug_macro.dwo   DW_SECT_MACRO   .debug_rnglists.dwo DW_SECT_RNGLISTS
gdb/ChangeLog
gdb/dwarf2/read.c