aboutsummaryrefslogtreecommitdiff
path: root/binutils/prdbg.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-01-25 16:18:41 +0000
committerNick Clifton <nickc@redhat.com>2008-01-25 16:18:41 +0000
commit6e3d6dc1ed34b1a58ed922ce31a5cf63502f4bce (patch)
tree20b99c7b038e8a3008462a0137410a21b286e071 /binutils/prdbg.c
parent53d25da64b00c1cf7f10d04785d66fa003f8bfc9 (diff)
downloadgdb-6e3d6dc1ed34b1a58ed922ce31a5cf63502f4bce.zip
gdb-6e3d6dc1ed34b1a58ed922ce31a5cf63502f4bce.tar.gz
gdb-6e3d6dc1ed34b1a58ed922ce31a5cf63502f4bce.tar.bz2
Add mingw I64 support for printing long and long long values
Diffstat (limited to 'binutils/prdbg.c')
-rw-r--r--binutils/prdbg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index 14e371c..39b9e3f 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -502,12 +502,21 @@ print_vma (bfd_vma vma, char *buf, bfd_boolean unsignedp, bfd_boolean hexp)
#if BFD_HOST_64BIT_LONG_LONG
else if (sizeof (vma) <= sizeof (unsigned long long))
{
+#ifndef __MSVCRT__
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);
+#else
+ if (hexp)
+ sprintf (buf, "0x%I64x", (unsigned long long) vma);
+ else if (unsignedp)
+ sprintf (buf, "%I64u", (unsigned long long) vma);
+ else
+ sprintf (buf, "%I64d", (long long) vma);
+#endif
}
#endif
else
@@ -1942,8 +1951,6 @@ tg_start_compilation_unit (void * p, const char *filename ATTRIBUTE_UNUSED)
{
struct pr_handle *info = (struct pr_handle *) p;
- fprintf (stderr, "New compilation unit: %s\n", filename);
-
free (info->filename);
/* Should it be relative? best way to do it here?. */
info->filename = strdup (filename);