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: [PATCH] readelf: Add base to offsets in format_dwarf_addr for debug_loc/ranges.


On Mon, 2013-01-21 at 13:16 -0800, Josh Stone wrote:
> On 01/18/2013 01:28 PM, Mark Wielaard wrote:
> > Collect the base address of the CU while creating the listptr_tables
> > and use them when printing debug ranges and location entries with
> > format_dwarf_addr ().
> 
> Just to provide some context, Mark is responding to my gripe here:
>     https://bugzilla.redhat.com/show_bug.cgi?id=896741
> 
> In comments 2 and 7, I noted that binutils already adjusts for the base
> address, and this is much more helpful to me to see what's happening.

Thanks for providing the context. I also just fixed it because we were
calling format_dwarf_addr () with bogus addresses (actually not
addresses at all). Have you tried the patch, does it produce the
addresses you are expecting? I did a quick spot check on the vmlinux
kernel image and some random binaries and things look fine (checked
against the binutils readelf output), but I probably should add an
explicit testcase just in case.

Cheers,

Mark


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