diff options
Diffstat (limited to 'gdb/sh3-rom.c')
-rw-r--r-- | gdb/sh3-rom.c | 17 |
1 files changed, 15 insertions, 2 deletions
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 |