multi debug files and artificial module

Mark Wielaard
Wed Nov 4 13:35:01 GMT 2020

Hi Sasha,

On Tue, 2020-11-03 at 21:37 +0000, Sasha Da Rocha Pinheiro via
Elfutils-devel wrote:
> we are currently dealing with multiple separate debug files, the
> normal stripped ones put in .debug/ folder and now the ones generated
> by DWZ and put into .dwz/ folder.
> When loading a normal stripped debug files who has a dwz file, I saw
> the same DIE (same id) twice with different data. Would it be a bug
> in DWZ or a correct dwarf state?
> Also is "<artificial>" the name of the following compilation unit? Or
> is it a bug in eu-redealf/libdw?

Looking at what you posted you are actually looking at 3 different
types of CU DIEs. The "normal" separate .debug DIEs. The supplemental
(dwz alt file) DIEs and LTO (gcc -flto generated) DIEs. For the last
ones (which have GNU GIMPLE as producer, the internal GCC
representation of the program) it is correct to have them marked
"artificial", these CUs contain common code/types from the objects
combined by LTO (Link Time Optimization). If by "same id" you mean
"offset" (the hex value in square brackets) then yes, DIE offsets in
separate files (Dwarf objects) can be the same. The DIEs from the
.debug file and the DIEs from the .multi (supplemental) file are
represented by different Dwarf objects and DIEs with the same offset in
separate Dwarf objects are different DIEs.



> Compilation unit at offset 946:
>  Version: 4, Abbreviation section offset: 0, Address size: 8, Offset
> size: 4
>  [   3bd]  compile_unit         abbrev: 63
>            producer             (strp) "GNU GIMPLE 10.2.1 20200723
> (Red Hat 10.2.1-1) -m64 -mtune=generic -march=x86-64 -g -g -O2 -O2
> -fno-openmp -fno-openacc -fPIC -fstack-protector-strong -fltrans
> -fplugin=ann
> obin"
>            language             (data1) C99 (12)
>            name                 (GNU_strp_alt) "<artificial>"
>            comp_dir             (GNU_strp_alt)
> "/usr/src/debug/libiscsi-1.19.0-2.fc33.x86_64/lib"
>            low_pc               (addr) +0x0000000000008030
> <iscsi_free_discovery_addresses>
>            high_pc              (udata) 51811 (+0x0000000000014a93
> <.annobin_iscsi_extended_copy_task.end>)
>            stmt_list            (sec_offset) 0

More information about the Elfutils-devel mailing list