This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Word size confusion in display_debug_ranges() in binutils-2.18/binutils/dwarf.c
- From: Jay Foad <jay dot foad at gmail dot com>
- To: nickc at redhat dot com
- Cc: binutils at sourceware dot org
- Date: Wed, 25 Mar 2009 12:21:50 +0000
- Subject: Re: Word size confusion in display_debug_ranges() in binutils-2.18/binutils/dwarf.c
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.