This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4/10] Add missing bfd_vma type to builtin_type


Hello,

the builtin_type structure already contains duplicate copies of all
builtin data types that depend on the architecture, except for bfd_vma.
This patch fixes that omission.

Bye,
Ulrich


ChangeLog:

	* gdbarch.h (struct builtin_type): Add member builtin_bfd_vma.
	* gdbarch.c (gdbtypes_post_init): Initialize it.

diff -urNp gdb-orig/gdb/gdbtypes.c gdb-head/gdb/gdbtypes.c
--- gdb-orig/gdb/gdbtypes.c	2007-06-08 18:24:43.124529099 +0200
+++ gdb-head/gdb/gdbtypes.c	2007-06-08 18:25:00.790644653 +0200
@@ -3578,6 +3578,10 @@ gdbtypes_post_init (struct gdbarch *gdba
     init_type (TYPE_CODE_INT, TARGET_ADDR_BIT / 8,
 	       TYPE_FLAG_UNSIGNED,
 	       "__CORE_ADDR", (struct objfile *) NULL);
+  builtin_type->builtin_bfd_vma =
+    init_type (TYPE_CODE_INT, TARGET_BFD_VMA_BIT / 8,
+	       TYPE_FLAG_UNSIGNED,
+	       "__bfd_vma", (struct objfile *) NULL);
 
   return builtin_type;
 }
diff -urNp gdb-orig/gdb/gdbtypes.h gdb-head/gdb/gdbtypes.h
--- gdb-orig/gdb/gdbtypes.h	2007-06-08 18:24:43.168522766 +0200
+++ gdb-head/gdb/gdbtypes.h	2007-06-08 18:25:00.832638607 +0200
@@ -1001,6 +1001,12 @@ struct builtin_type
   /* The target CPU's address type.  This is the ISA address size.  */
   struct type *builtin_core_addr;
 
+  /* The symbol table address type.  Some object file formats have a 32
+     bit address type even though the TARGET has a 64 bit pointer type
+     (cf MIPS).  */
+  struct type *builtin_bfd_vma;
+
+
   /* Integral types.  */
 
   /* We use this for the '/c' print format, because c_char is just a
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]