From d90cf509bd4aee2e024979a75685826a5289ba22 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 21 Aug 2003 20:43:10 +0000 Subject: 2003-08-21 Andrew Cagney * sh3-rom.c (sh3_open, sh3e_open): Use gdbarch_update_p to select a specific architecture. * arch-utils.h (set_architecture_from_arch_mach): Delete declaration. (target_architecture_hook): Delete declaration. * arch-utils.c: Delete non GDB_MULTI_ARCH includes. (default_float_format): Assume GDB_MULTI_ARCH. (default_double_format): Assume GDB_MULTI_ARCH. (set_endian_from_file): Delete function. (arch_ok): Delete function. (set_arch): Delete function. (set_architecture_from_arch_mach): Delete function. (set_architecture_from_file): Delete function. (set_architecture): Assume GDB_MULTI_ARCH. (set_gdbarch_from_file): Assume GDB_MULTI_ARCH. --- gdb/sh3-rom.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'gdb/sh3-rom.c') diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c index b946e6f..ec274ef 100644 --- a/gdb/sh3-rom.c +++ b/gdb/sh3-rom.c @@ -281,8 +281,15 @@ sh3_open (char *args, int from_tty) parallel_in_use = 1; } + /* If we connected successfully, we know the processor is an SH3. */ - set_architecture_from_arch_mach (bfd_arch_sh, bfd_mach_sh3); + { + struct gdbarch_info info; + gdbarch_info_init (&info); + info.bfd_arch_info = bfd_lookup_arch (bfd_arch_sh, bfd_mach_sh3); + if (!gdbarch_update_p (info)) + error ("Target is not an SH3"); + } } @@ -329,7 +336,13 @@ sh3e_open (char *args, int from_tty) } /* If we connected successfully, we know the processor is an SH3E. */ - set_architecture_from_arch_mach (bfd_arch_sh, bfd_mach_sh3); + { + struct gdbarch_info info; + gdbarch_info_init (&info); + info.bfd_arch_info = bfd_lookup_arch (bfd_arch_sh, bfd_mach_sh3); + if (!gdbarch_update_p (info)) + error ("Target is not an SH3"); + } } static void -- cgit v1.1