From: gkm Date: Mon, 7 Jan 2008 23:17:48 +0000 (+0000) Subject: * prdbg.c (print_vma): Print as long long, if host supports it. X-Git-Tag: EOL_registry_mounts~1046 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=175675767ca4e9f7f25f2a7383a21051ac6270d5;p=pf3gnuchains%2Fpf3gnuchains4x.git * prdbg.c (print_vma): Print as long long, if host supports it. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index fe0ed8fc2a..25e9ff29fe 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2008-01-04 Greg McGary + + * prdbg.c (print_vma): Print as long long, if host supports it. + 2008-01-03 Nick Clifton * dwarf.c (read_and_display_attr_value): Prefix values that are diff --git a/binutils/prdbg.c b/binutils/prdbg.c index 098bd58c3d..14e371c2bc 100644 --- a/binutils/prdbg.c +++ b/binutils/prdbg.c @@ -1,5 +1,5 @@ /* prdbg.c -- Print out generic debugging information. - Copyright 1995, 1996, 1999, 2002, 2003, 2004, 2006, 2007 + Copyright 1995, 1996, 1999, 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Ian Lance Taylor . Tags style generation written by Salvador E. Tropea . @@ -499,6 +499,17 @@ print_vma (bfd_vma vma, char *buf, bfd_boolean unsignedp, bfd_boolean hexp) else sprintf (buf, "%ld", (long) vma); } +#if BFD_HOST_64BIT_LONG_LONG + else if (sizeof (vma) <= sizeof (unsigned long long)) + { + if (hexp) + sprintf (buf, "0x%llx", (unsigned long long) vma); + else if (unsignedp) + sprintf (buf, "%llu", (unsigned long long) vma); + else + sprintf (buf, "%lld", (long long) vma); + } +#endif else { buf[0] = '0';