This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dump of alternate .debuginfo


Mark Wielaard wrote:
> On Tue, Jul 30, 2013 at 06:05:00PM +0400, Andrey Ponomarenko wrote:
>> Hi,
>>
>> I created a dump of a library debug-info by the "eu-readelf
>> --debug-dump=info" command. The formal_parameter of a subprogram has
>> type "(GNU_ref_alt) [    N]", but N is not described anywhere in the
>> dump.
>>
>> I have take a look at the source code of elfutils and found, that
>> DW_FORM_GNU_ref_alt is an offset in the "alternate debuginfo":
>>
>>      DW_FORM_GNU_ref_alt = 0x1f20, /* offset in alternate .debuginfo.  */
>>      DW_FORM_GNU_strp_alt = 0x1f21 /* offset in alternate .debug_str. */
>>
>> How can I read/dump this "alternate debuginfo"?
> DWARF extensions elfutils recognizes/supports are described at:
> https://fedorahosted.org/elfutils/wiki/DwarfExtensions
>
> When configured with --enable-dwz libdw will resolve these FORMs.
>
> The new forms are described in this DWARF5 proposal:
> http://www.dwarfstd.org/ShowIssue.php?issue=120604.1
>
> You can find the alt dwz file by reading the .gnu_debugaltlink section.
> Which contains a file name followed by the build-id of the dwz file.
> Resolving the build-id is done in the regular way as described at
> https://fedoraproject.org/wiki/Releases/FeatureBuildId#Find_files_by_build_ID
> The build-id symlink will point at the /usr/lib/debug/.dwz/ file.

Thank you.

What is the best way to read the file name from .gnu_debugaltlink section?

I've tried objdump:

   $> eu-objdump -s -j .gnu_debugaltlink 
usr/lib/debug/usr/lib64/libTKLCAF.so.6.0.0.debug

   Contents of section .gnu_debugaltlink:
    0000 2e2e2f2e 2e2f2e64 777a2f4f 43452d30  ../../.dwz/OCE-0
    0010 2e31322d 312e6663 31382e78 38365f36  .12-1.fc18.x86_6
    0020 3400f971 c94aa7b5 33115f63 bbc3d3ed  4..q.J..3._c....
    0030 88f7cdb6 ae09                        ......

So the path to the alternate debug info file is 
"../../.dwz/OCE-0.12-1.fc18.x86_64", but it's not so easy to parse it 
from the output.

-- 
Andrey Ponomarenko, ROSA Lab.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]