This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Zap more !GDB_MULTI_ARCH
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 24 Aug 2003 07:49:41 -0400
- Subject: [commit] Zap more !GDB_MULTI_ARCH
Hello,
This should cleanup a few straggling tests for GDB_MULTI_ARCH.
committed,
Andrew
2003-08-24 Andrew Cagney <cagney@redhat.com>
* arm-tdep.c (_initialize_arm_tdep): Simplify by assuming
GDB_MULTI_ARCH is always non-zero.
* osabi.c (_initialize_gdb_osabi): Ditto.
(gdbarch_init_osabi): Ditto.
* sparc-tdep.c: Ditto for #if code.
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.143
diff -u -r1.143 arm-tdep.c
--- arm-tdep.c 13 Jun 2003 14:15:51 -0000 1.143
+++ arm-tdep.c 24 Aug 2003 11:45:19 -0000
@@ -3024,8 +3024,7 @@
int numregs, i, j;
static char *helptext;
- if (GDB_MULTI_ARCH)
- gdbarch_register (bfd_arch_arm, arm_gdbarch_init, arm_dump_tdep);
+ gdbarch_register (bfd_arch_arm, arm_gdbarch_init, arm_dump_tdep);
/* Register an ELF OS ABI sniffer for ARM binaries. */
gdbarch_register_osabi_sniffer (bfd_arch_arm,
Index: osabi.c
===================================================================
RCS file: /cvs/src/src/gdb/osabi.c,v
retrieving revision 1.16
diff -u -r1.16 osabi.c
--- osabi.c 22 Jun 2003 17:42:29 -0000 1.16
+++ osabi.c 24 Aug 2003 11:45:19 -0000
@@ -319,17 +319,13 @@
}
}
- /* We assume that if GDB_MULTI_ARCH is less than GDB_MULTI_ARCH_TM
- that an ABI variant can be supported by overriding definitions in
- the tm-file. */
- if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- fprintf_filtered
- (gdb_stderr,
- "A handler for the OS ABI \"%s\" is not built into this "
- "configuration of GDB. "
- "Attempting to continue with the default %s settings",
- gdbarch_osabi_name (info.osabi),
- bfd_printable_arch_mach (arch_info->arch, arch_info->mach));
+ fprintf_filtered
+ (gdb_stderr,
+ "A handler for the OS ABI \"%s\" is not built into this "
+ "configuration of GDB. "
+ "Attempting to continue with the default %s settings",
+ gdbarch_osabi_name (info.osabi),
+ bfd_printable_arch_mach (arch_info->arch, arch_info->mach));
}
@@ -571,8 +567,7 @@
bfd_target_elf_flavour,
generic_elf_osabi_sniffer);
- if (!GDB_MULTI_ARCH)
- return;
+ return;
/* Register the "set osabi" command. */
c = add_set_enum_cmd ("osabi", class_support, gdb_osabi_available_names,
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.118
diff -u -r1.118 sparc-tdep.c
--- sparc-tdep.c 17 Jul 2003 18:49:35 -0000 1.118
+++ sparc-tdep.c 24 Aug 2003 11:45:25 -0000
@@ -51,8 +51,6 @@
* Some local macros that have multi-arch and non-multi-arch versions:
*/
-#if (GDB_MULTI_ARCH > 0)
-
#if 0
// OBSOLETE /* Does the target have Floating Point registers? */
// OBSOLETE #define SPARC_HAS_FPU (gdbarch_tdep (current_gdbarch)->has_fpu)
@@ -66,49 +64,6 @@
#define SPARC_INTREG_SIZE (gdbarch_tdep (current_gdbarch)->intreg_size)
/* Offset within the call dummy stack of the saved registers. */
#define DUMMY_REG_SAVE_OFFSET (gdbarch_tdep (current_gdbarch)->reg_save_offset)
-
-#else /* non-multi-arch */
-
-
-/* Does the target have Floating Point registers? */
-#if 0
-// OBSOLETE #if defined(TARGET_SPARCLET) || defined(TARGET_SPARCLITE)
-// OBSOLETE #define SPARC_HAS_FPU 0
-// OBSOLETE #else
-// OBSOLETE #define SPARC_HAS_FPU 1
-// OBSOLETE #endif
-#endif
-#define SPARC_HAS_FPU 1
-
-/* Number of bytes devoted to Floating Point registers: */
-#if (GDB_TARGET_IS_SPARC64)
-#define FP_REGISTER_BYTES (64 * 4)
-#else
-#if (SPARC_HAS_FPU)
-#define FP_REGISTER_BYTES (32 * 4)
-#else
-#define FP_REGISTER_BYTES 0
-#endif
-#endif
-
-/* Highest numbered Floating Point register. */
-#if (GDB_TARGET_IS_SPARC64)
-#define FP_MAX_REGNUM (FP0_REGNUM + 48)
-#else
-#define FP_MAX_REGNUM (FP0_REGNUM + 32)
-#endif
-
-/* Size of a general (integer) register: */
-#define SPARC_INTREG_SIZE (REGISTER_RAW_SIZE (G0_REGNUM))
-
-/* Offset within the call dummy stack of the saved registers. */
-#if (GDB_TARGET_IS_SPARC64)
-#define DUMMY_REG_SAVE_OFFSET (128 + 16)
-#else
-#define DUMMY_REG_SAVE_OFFSET 0x60
-#endif
-
-#endif /* GDB_MULTI_ARCH */
struct gdbarch_tdep
{