aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2008-01-07 23:17:48 +0000
committerGreg McGary <greg@mcgary.org>2008-01-07 23:17:48 +0000
commit3c75e4f892a17781fa01f5a2f63f8225554e4c68 (patch)
tree417f67460f4cde6364255e22f4b2612f94c789fc /binutils
parent6945b3e87bf0dd0b73b384abb46b052e246cc816 (diff)
downloadgdb-3c75e4f892a17781fa01f5a2f63f8225554e4c68.zip
gdb-3c75e4f892a17781fa01f5a2f63f8225554e4c68.tar.gz
gdb-3c75e4f892a17781fa01f5a2f63f8225554e4c68.tar.bz2
* prdbg.c (print_vma): Print as long long, if host supports it.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/prdbg.c13
2 files changed, 16 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index fe0ed8f..25e9ff2 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-04 Greg McGary <greg@mcgary.org>
+
+ * prdbg.c (print_vma): Print as long long, if host supports it.
+
2008-01-03 Nick Clifton <nickc@redhat.com>
* dwarf.c (read_and_display_attr_value): Prefix values that are
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index 098bd58..14e371c 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 <ian@cygnus.com>.
Tags style generation written by Salvador E. Tropea <set@computer.org>.
@@ -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';