]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix the decoding of DW_FORM_ref_addr DWARF attribute.
authorNick Clifton <nickc@redhat.com>
Tue, 27 Oct 2020 16:17:13 +0000 (16:17 +0000)
committerMark Wielaard <mark@klomp.org>
Mon, 16 Nov 2020 19:41:54 +0000 (20:41 +0100)
commitef5e3e92dc7234f64e77e8c8af5d61685d96263b
tree93f4ece82ff2a9bb5735e0949f68a230fff58cc9
parente7c1a13eb8fcdbd389b75b6ce261b17f7947ad9d
Fix the decoding of DW_FORM_ref_addr DWARF attribute.

* dwarf.c (struct abbrev_list): New structure.  Used to collect
lists of abbreviation sets.
(struct abbrev_map): New structure.  Used to map CU offsets to
abbreviation offsets.
(record_abbrev_list): New function.  A new entry to an
abbreviation list.
(free_all_abbrevs): Update to free abbreviation lists.
(new_abbrev_list): New function.  Start a new abbreviation
list.
(find_abbrev_list_by_abbrev_offset): New function.
(find_abbrev_map_by_offset): New function.
(add_abbrev): Add abbrev_list parameter.
(add_abbrev_attr): Likewise.
(process_abbrev_section): Rename to process_abbrev_set and add
list parameter.
(get_type_abbrev_from_form): New function.  Attempts to decode the
forms used by DW_AT_type attributes.
(get_type_signedness): Display type names if operating in wide
mode.  Use get_type_abbrev_from_form.
(read_and_display_attr_value): Use get_type_abbrev_from_form.
(process_debug_info): Pre-parse the CU headers to collate all the
abbrevs before starting the main scan.
(process_debug_abbrev): Do not free any loaded abbrevs.
(free_debug_memory): Free the abbrev maps.

(cherry picked from commit bcd213b2cfbca2df53fb7e5d187fd67ea8eb7185)
binutils/ChangeLog
binutils/dwarf.c