This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [3/4] Remove macro TARGET_BFD_VMA_BIT
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Wed, 13 Jun 2007 19:22:08 +0200
- Subject: [rfc] [3/4] Remove macro TARGET_BFD_VMA_BIT
Hello,
this patch removes TARGET_BFD_VMA_BIT macro from gdbarch.sh.
ChangeLog:
* gdbarch.sh (TARGET_BFD_VMA_BIT): Replace by gdbarch_bfd_vma_bit.
* gdbtypes.c (build_flt): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
Is this ok to commit?
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
diff -urN src.1/gdb/gdbarch.c dev/gdb/gdbarch.c
--- src.1/gdb/gdbarch.c 2007-06-13 17:16:49.000000000 +0200
+++ dev/gdb/gdbarch.c 2007-06-13 17:16:59.000000000 +0200
@@ -699,11 +699,6 @@
fprintf_unfiltered (file,
"gdbarch_dump: bfd_arch_info = %s\n",
TARGET_ARCHITECTURE->printable_name);
-#ifdef TARGET_BFD_VMA_BIT
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
- XSTRING (TARGET_BFD_VMA_BIT));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: bfd_vma_bit = %s\n",
paddr_d (current_gdbarch->bfd_vma_bit));
diff -urN src.1/gdb/gdbarch.h dev/gdb/gdbarch.h
--- src.1/gdb/gdbarch.h 2007-06-13 17:16:49.000000000 +0200
+++ dev/gdb/gdbarch.h 2007-06-13 17:16:59.000000000 +0200
@@ -157,12 +157,6 @@
extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch);
extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit);
-#if !defined (GDB_TM_FILE) && defined (TARGET_BFD_VMA_BIT)
-#error "Non multi-arch definition of TARGET_BFD_VMA_BIT"
-#endif
-#if !defined (TARGET_BFD_VMA_BIT)
-#define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch))
-#endif
/* One if `char' acts like `signed char', zero if `unsigned char'. */
diff -urN src.1/gdb/gdbarch.sh dev/gdb/gdbarch.sh
--- src.1/gdb/gdbarch.sh 2007-06-13 17:16:49.000000000 +0200
+++ dev/gdb/gdbarch.sh 2007-06-13 17:16:59.000000000 +0200
@@ -415,7 +415,7 @@
# addr_bit is the size of a target address as represented in gdb
v::int:addr_bit:::8 * sizeof (void*):0:TARGET_PTR_BIT:
# Number of bits in a BFD_VMA for the target object file format.
-v:TARGET_BFD_VMA_BIT:int:bfd_vma_bit:::8 * sizeof (void*):TARGET_ARCHITECTURE->bits_per_address::0
+v::int:bfd_vma_bit:::8 * sizeof (void*):TARGET_ARCHITECTURE->bits_per_address::0
#
# One if \`char' acts like \`signed char', zero if \`unsigned char'.
v::int:char_signed:::1:-1:1
diff -urN src.1/gdb/gdbtypes.c dev/gdb/gdbtypes.c
--- src.1/gdb/gdbtypes.c 2007-06-13 17:16:49.000000000 +0200
+++ dev/gdb/gdbtypes.c 2007-06-13 17:16:59.000000000 +0200
@@ -3578,7 +3578,7 @@
TYPE_FLAG_UNSIGNED,
"__CORE_ADDR", (struct objfile *) NULL);
builtin_type_bfd_vma =
- init_type (TYPE_CODE_INT, TARGET_BFD_VMA_BIT / 8,
+ init_type (TYPE_CODE_INT, gdbarch_addr_bit (current_gdbarch) / 8,
TYPE_FLAG_UNSIGNED,
"__bfd_vma", (struct objfile *) NULL);
}