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: Nick Clifton <nickc at redhat dot com>
- To: Jay Foad <jay dot foad at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 27 Mar 2009 14:26:37 +0000
- Subject: Re: Word size confusion in display_debug_ranges() in binutils-2.18/binutils/dwarf.c
- References: <ee2e06e90903250521g61fdb6e6i67e962bb09603ad8@mail.gmail.com>
Hi Jay,
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);
Oops, so it does. Fixed with the attached patch.
Cheers
Nick
binutils/ChangeLog
2009-03-27 Nick Clifton <nickc@redhat.com>
* dwarf.c (display_debug_ranges): Add the base address to the
displayed values for 'Begin' and 'End'.
Index: binutils/dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.43
diff -c -3 -p -r1.43 dwarf.c
*** binutils/dwarf.c 20 Mar 2009 00:05:37 -0000 1.43
--- binutils/dwarf.c 27 Mar 2009 12:40:54 -0000
*************** display_debug_ranges (struct dwarf_secti
*** 3576,3592 ****
break;
}
- print_dwarf_vma (begin, pointer_size);
- print_dwarf_vma (end, pointer_size);
-
/* Check base address specifiers. */
if (begin == (dwarf_vma) -1 && end != (dwarf_vma) -1)
{
base_address = end;
printf ("(base address)\n");
continue;
}
if (begin == end)
fputs (_("(start == end)"), stdout);
else if (begin > end)
--- 3576,3594 ----
break;
}
/* Check base address specifiers. */
if (begin == (dwarf_vma) -1 && end != (dwarf_vma) -1)
{
base_address = end;
+ print_dwarf_vma (begin, pointer_size);
+ print_dwarf_vma (end, pointer_size);
printf ("(base address)\n");
continue;
}
+ print_dwarf_vma (begin + base_address, pointer_size);
+ print_dwarf_vma (end + base_address, pointer_size);
+
if (begin == end)
fputs (_("(start == end)"), stdout);
else if (begin > end)