https://sourceware.org/bugzilla/show_bug.cgi?id=34666
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Mark Wielaard <mark at klomp dot org> ---
commit 7b675cbdb0d1f216938b4b33aea30fd35fb1ae0a
Author: Mark Wielaard <[email protected]>
Date: Tue Sep 22 13:29:34 2026 +0200
srcfiles: Always process the "zero" file table entry (CU comp_dir/name)
If the main CU file doesn't contain any references to the file table
it wouldn't show up in the src files list (except if --cu-only was
given). This is because file entry "zero" is special. It cannot be
referred to by DW_AT file attributes (because zero means, no
file). But technically it should be equal to (implicitly before
DWARF5) the DW_AT_name of the main CU DIE (using a zero directory
entry, equal to DW_AT_comp_dir). collect_sourcefiles skipped this
implicit zero entry unless --cu-only was given.
Fix this by always handling the zero file table entry. And for
--cu-only to just exit the loop early, so no other entries are handled
This is also an optimization, before --cu-only would go through all
indexes, but always added the CU name. Which worked, because
duplicates were removed, but was somewhat inefficient.
* src/srcfiles.cxx (collect_sourcefiles): Go from index
zero, exit after zero index for CU_only, always handle
index zero specially.
https://sourceware.org/bugzilla/show_bug.cgi?id=34666
Signed-off-by: Mark Wielaard <[email protected]>
--
You are receiving this mail because:
You are on the CC list for the bug.