aboutsummaryrefslogtreecommitdiff
path: root/bfd
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 /bfd
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 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/bfd-in.h7
-rw-r--r--bfd/bfd-in2.h5
-rw-r--r--bfd/bfd.c4
4 files changed, 20 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 85d809a..42d637c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-25 Kai Tietz <kai.tietz@onevision.com>
+
+ * bfd-in.h: Add mingw I64 support.
+ * bfd-in2.h: Regenerated.
+ * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
+
2008-01-21 Alan Modra <amodra@bigpond.net.au>
PR 4453
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index f37efb2..43c342c 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -1,7 +1,7 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -133,9 +133,14 @@ typedef BFD_HOST_U_64_BIT symvalue;
#define sprintf_vma(s,x) sprintf (s, "%016lx", x)
#define fprintf_vma(f,x) fprintf (f, "%016lx", x)
#elif BFD_HOST_64BIT_LONG_LONG
+#ifndef __MSVCRT__
#define sprintf_vma(s,x) sprintf (s, "%016llx", x)
#define fprintf_vma(f,x) fprintf (f, "%016llx", x)
#else
+#define sprintf_vma(s,x) sprintf (s, "%016I64x", x)
+#define fprintf_vma(f,x) fprintf (f, "%016I64x", x)
+#endif
+#else
#define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
#define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
#define fprintf_vma(s,x) \
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 9e18548..b514ad1 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -140,9 +140,14 @@ typedef BFD_HOST_U_64_BIT symvalue;
#define sprintf_vma(s,x) sprintf (s, "%016lx", x)
#define fprintf_vma(f,x) fprintf (f, "%016lx", x)
#elif BFD_HOST_64BIT_LONG_LONG
+#ifndef __MSVCRT__
#define sprintf_vma(s,x) sprintf (s, "%016llx", x)
#define fprintf_vma(f,x) fprintf (f, "%016llx", x)
#else
+#define sprintf_vma(s,x) sprintf (s, "%016I64x", x)
+#define fprintf_vma(f,x) fprintf (f, "%016I64x", x)
+#endif
+#else
#define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
#define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
#define fprintf_vma(s,x) \
diff --git a/bfd/bfd.c b/bfd/bfd.c
index a2302f8..da27baa 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1,6 +1,6 @@
/* Generic BFD library interface and support routines.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -916,6 +916,8 @@ bfd_get_sign_extend_vma (bfd *abfd)
if (CONST_STRNEQ (name, "coff-go32")
|| strcmp (name, "pe-i386") == 0
|| strcmp (name, "pei-i386") == 0
+ || strcmp (name, "pe-x86-64") == 0
+ || strcmp (name, "pei-x86-64") == 0
|| strcmp (name, "pe-arm-wince-little") == 0
|| strcmp (name, "pei-arm-wince-little") == 0)
return 1;