https://sourceware.org/bugzilla/show_bug.cgi?id=26829
Bug ID: 26829 Summary: [readelf] wrong dir printed for .dwo file listing Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- Consider the source files gdb/testsuite/gdb.dwarf2/fission-multi-cu*.c, compiled like this: ... $ clang -g -gsplit-dwarf -flto *.c ... Using readelf on the a.out to look at the generated dwarf, we get: ... $ ~/binutils/install/bin/readelf -w a.out 2>&1 | more The .debug_info section contains link(s) to dwo file(s): Name: a.out_dwo/0.dwo Directory: /home/abuild/rpmbuild/BUILD/glibc-2.26/csu ID: d9 0e 49 4a b8 f0 7b f3 readelf: Warning: Unable to load dwo file: /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/a.out_dw o/0.dwo Name: a.out_dwo/0.dwo Directory: /home/vries/fission/fission-multi-cu ID: 04 88 5d 18 be ef c8 0b a.out: Found separate debug object file: /home/vries/fission/fission-multi-cu/a.out_dwo/0.dwo ... It seems the wrong directory was used for the first ID. That is, the dir of one of the other CUs was used: ... $ grep DW_AT_comp_dir.*: READELF | sed 's/:.*:/:/' <24> DW_AT_comp_dir : /home/abuild/rpmbuild/BUILD/glibc-2.26/csu <43> DW_AT_comp_dir : /home/abuild/rpmbuild/BUILD/glibc-2.26/csu <bd> DW_AT_comp_dir : /home/abuild/rpmbuild/BUILD/glibc-2.26/csu <d7> DW_AT_comp_dir : /home/vries/fission/fission-multi-cu <107> DW_AT_comp_dir : /home/vries/fission/fission-multi-cu <13c> DW_AT_comp_dir : /home/abuild/rpmbuild/BUILD/glibc-2.26/csu <2f7> DW_AT_comp_dir : /home/abuild/rpmbuild/BUILD/glibc-2.26/csu ... The skeleton CUs look fine though, with the correct DW_AT_comp_dir: ... <0><d2>: Abbrev Number: 1 (DW_TAG_compile_unit) <d3> DW_AT_stmt_list : 0xe9 <d7> DW_AT_comp_dir : /home/vries/fission/fission-multi-cu <db> DW_AT_GNU_pubnames: 1 <db> DW_AT_GNU_dwo_name: a.out_dwo/0.dwo <df> DW_AT_GNU_dwo_id : 0xbc8efbe185d8804 <e7> DW_AT_low_pc : 0x4004a0 <ef> DW_AT_high_pc : 0xf <f3> DW_AT_GNU_addr_base: 0x0 <0><102>: Abbrev Number: 1 (DW_TAG_compile_unit) <103> DW_AT_stmt_list : 0x13c <107> DW_AT_comp_dir : /home/vries/fission/fission-multi-cu <10b> DW_AT_GNU_pubnames: 1 <10b> DW_AT_GNU_dwo_name: a.out_dwo/0.dwo <10f> DW_AT_GNU_dwo_id : 0xf37bf0b84a490ed9 <117> DW_AT_low_pc : 0x4004b0 <11f> DW_AT_high_pc : 0x14 <123> DW_AT_GNU_addr_base: 0x0 ... -- You are receiving this mail because: You are on the CC list for the bug.