This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
objdump --full-contents truncates addresses to long
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 25 Mar 2003 04:03:18 -0300
- Subject: objdump --full-contents truncates addresses to long
- Organization: GCC Team, Red Hat
Truncating to long is not a good idea for a 32-x-64 objdump. Is there
any reason for us to not use bfd_printf_vma? Perhaps bfd_printf_vma
should be made more flexible, accepting arguments specifying the a
minimum/maximum width to be printed, and whether to pad with zeros?
Other than the ugly implications of this change to the testsuite, that
I'll look into addressing if this patch is approved, is this ok to
install along with the testsuite fixes?
Index: binutils/ChangeLog
from Alexandre Oliva <aoliva at redhat dot com>
* objdump.c (dump_data): Don't truncate the address to long, using
bfd_print_vma instead.
Index: binutils/objdump.c
===================================================================
RCS file: /cvs/uberbaum/binutils/objdump.c,v
retrieving revision 1.63
diff -u -p -r1.63 objdump.c
--- binutils/objdump.c 17 Mar 2003 11:16:51 -0000 1.63
+++ binutils/objdump.c 25 Mar 2003 06:55:46 -0000
@@ -2268,8 +2268,9 @@ dump_data (abfd)
{
bfd_size_type j;
- printf (" %04lx ", (unsigned long int)
- (addr_offset + section->vma));
+ putchar (' ');
+ bfd_printf_vma (abfd, (addr_offset + section->vma));
+ putchar (' ');
for (j = addr_offset * opb;
j < addr_offset * opb + onaline; j++)
{
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer