Word size confusion in display_debug_ranges() in binutils-2.18/binutils/dwarf.c
Jay Foad
jay.foad@gmail.com
Wed Mar 25 12:22:00 GMT 2009
Nick Clifton wrote (http://sourceware.org/ml/binutils/2008-01/msg00306.html):
> Alan Modra wrote:
>
> > Yes. There are many places where a 32-bit readelf can fail to dump a
> > 64-bit object file correctly. This patch doesn't even attempt to fix
> > them..
>
>
> But this one does. :-)
> binutils/ChangeLog
> 2008-01-29 Nick Clifton <nickc@redhat.com>
>
>
> * dwarf.c (print_dwarf_vma): New function. Display the value of a
> dwarf_vma type at a specified precision.
> (display_debug_loc): Use dwarf_vma type for begin and end values.
> Use print_dwarf_vma to display their values. Use byte_get_signed
> in order to correctly detect the -1 escape value.
> (display_debug_aranges): Likewise.
> (display_debug_ranges): Likewise.
This patch seems to have changed the behaviour of
display_debug_ranges(), such that the range start and end values it
prints no longer include the base address. The relevant lines from the
patch are:
- printf (" %8.8lx %8.8lx %8.8lx",
- offset, begin + base_address, end + base_address);
+ print_dwarf_vma (begin, pointer_size);
+ print_dwarf_vma (end, pointer_size);
Thanks,
Jay.
More information about the Binutils
mailing list