[PING][PATCH] Support for DW_AT_loclists_base and DW_FORM_loclistx.
Achra, Nitika
Nitika.Achra@amd.com
Thu Jan 23 19:39:00 GMT 2020
[AMD Official Use Only - Internal Distribution Only]
A gentle reminder.
Regards,
Nitika Achra
-----Original Message-----
From: Achra, Nitika
Sent: Monday, January 20, 2020 2:47 PM
To: gdb-patches@sourceware.org
Cc: George, Jini Susan <JiniSusan.George@amd.com>; Ali Tamur <tamur@google.com>
Subject: [PATCH] Support for DW_AT_loclists_base and DW_FORM_loclistx.
[AMD Official Use Only - Internal Distribution Only]
Hello,
GDB is throwing the error 'Dwarf Error: Cannot handle DW_FORM_loclistx in DWARF reader' while loading the executable with -gdwarf-5 flag. This patch fixes that. Please find the attached patch file. Requesting the review.
*Support for DW_AT_loclists_base and DW_FORM_loclistx.
This patch handles DW_AT_loclists_base and DW_FORM_loclistx.
DW_AT_loclists_base is a new attribute added in DWARFv5 which points to the beginning of the offset table of .debug_loclist section. Reference to the location list (DW_FORM_loclistx) is interpreted relative to this base. DW_FORM_loclistx is a new form added in DWARFv5 which is used to access location list.
Tested by running the testsuite before and after the patch and there is no increase in the number of test cases that fails. Tested with both
-gdwarf-4 and -gdwarf-5 flags. Also tested -gslit-dwarf along with
-gdwarf-4 as well as -gdwarf5 flags.
gdb/ChangeLog:
*dwarf2read.c (cu_debug_loc_section): Added the declaration for the function.
(read_loclist_index): New function declaration.
(lookup_loclist_base): New function declaration.
(read_loclist_header): New function declaration
(dwarf2_cu): Added loclist_base and loclist_header field.
(dwarf2_locate_dwo_sections): Handle .debug_loclist.dwo section.
(read_full_die_1): Read the value of DW_AT_loclists_base.
(read_attribute_reprocess): Handle DW_FORM_loclistx.
(read_attribute_value): Handle DW_FORM_loclistx.
(skip_one_die): Handle DW_FORM_loclistx.
(attr_form_is_section_offset): Handle DW_FORM_loclistx.
(read_loclist_index): Function definition.
(lookup_loclist_base): Function definition.
(read_loclist_header): Function definition.
(loclist_header): New structure declaration.
Regards,
Nitika Achra
More information about the Gdb-patches
mailing list