diff options
author | Alan Modra <amodra@gmail.com> | 2019-12-02 23:37:34 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-12-03 17:30:58 +1030 |
commit | e63ef0954d02bec8ecb9cf7ff9fc14adc45e8010 (patch) | |
tree | 822465f1f6143252a0c4104d52f1c82483bc6abd /bfd/cpu-rs6000.c | |
parent | 99b06c600f0f5cb730cbdab9c3bb8b1f9317e0a1 (diff) | |
download | gdb-e63ef0954d02bec8ecb9cf7ff9fc14adc45e8010.zip gdb-e63ef0954d02bec8ecb9cf7ff9fc14adc45e8010.tar.gz gdb-e63ef0954d02bec8ecb9cf7ff9fc14adc45e8010.tar.bz2 |
PR25230, addr2line fails on dwz output
This patch remedies the following DW_FORM_GNU_ref_alt related problem:
/* FIXME: Do we need to locate the correct CU, in a similar
fashion to the code in the DW_FORM_ref_addr case above ? */
Without the correct CU the wrong abbrevs are used, resulting in
errors and/or wrong file names.
There is scope for further work here. Parsing of CUs should be a two
step process, with the first stage just finding the bounds of the CU.
This would allow find_abstract_instance to quickly find the CU
referenced by DW_FORM_ref_addr or DW_FORM_GNU_ref_alt, then take the
second stage of CU parsing where abbrevs, ranges and suchlike consume
time and memory. As it is, we just process CUs from the start of
.debug_info until we find the one of interest. The testcase in the PR
takes 98G of virtual memory.
PR 25230
* dwarf2.c (struct dwarf2_debug_file): Add line_table and
abbrev_offsets.
(struct abbrev_offset_entry): New.
(hash_abbrev, eq_abbrev, del_abbrev): New functions.
(read_abbrevs): Check whether we have already read abbrevs at
given offset, and add new offset/abbrev to hash table.
(decode_line_info): Keep line table at offset zero in file struct.
Return this for a cu reusing the same dir/file list.
(find_abstract_instance): Find cu for DW_FORM_GNU_ref_alt.
(_bfd_dwarf2_slurp_debug_info): Create offset/abbrev hash tables.
(_bfd_dwarf2_cleanup_debug_info): Adjust deletion of lines and
abbrevs.
Diffstat (limited to 'bfd/cpu-rs6000.c')
0 files changed, 0 insertions, 0 deletions