[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/25230] addr2line fails on dwz output

From: cvs-commit at gcc dot gnu.org
Subject: [Bug binutils/25230] addr2line fails on dwz output
Date: Tue, 03 Dec 2019 07:41:19 +0000


--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Alan Modra <address@hidden>:


commit e63ef0954d02bec8ecb9cf7ff9fc14adc45e8010
Author: Alan Modra <address@hidden>
Date:   Mon Dec 2 23:37:34 2019 +1030

    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
        (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

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]