From 454d05118bc21bb4966c0cb13d3bfc526c26e3b8 Mon Sep 17 00:00:00 2001 From: Dhananjay Deshpande Date: Thu, 11 Dec 2003 06:21:12 +0000 Subject: Fix GDB crash problem when object file of different H8 cpu is loaded --- gdb/config/h8300/tm-h8300.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'gdb/config/h8300') diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h index 807d7c0..a1c337e 100644 --- a/gdb/config/h8300/tm-h8300.h +++ b/gdb/config/h8300/tm-h8300.h @@ -20,20 +20,13 @@ Boston, MA 02111-1307, USA. */ /* Contributed by Steve Chamberlain sac@cygnus.com */ -/* NOTE: ezannoni 2000-07-18: these variables are part of sim, defined - in sim/h8300/compile.c. They really should not be used this - way. Because of this we cannot get rid of the macro - GDB_TARGET_IS_H8300 in remote-e7000.c */ -extern int h8300hmode; -extern int h8300smode; -extern int h8300_normal_mode; /* 1 - Normal Mode , 0 - Advanced mode */ -extern int h8300sxmode; -#define GDB_TARGET_IS_H8300 - /* Needed for remote.c */ #define DEPRECATED_REMOTE_BREAKPOINT { 0x57, 0x30} /* trapa #3 */ /* Needed for remote-hms.c */ #define CCR_REGNUM 8 /* Needed for remote-e7000.c */ -#define NUM_REALREGS (h8300smode?11:10) +#define NUM_REALREGS ((TARGET_ARCHITECTURE->mach == bfd_mach_h8300s || \ + TARGET_ARCHITECTURE->mach == bfd_mach_h8300sn || \ + TARGET_ARCHITECTURE->mach == bfd_mach_h8300sx || \ + TARGET_ARCHITECTURE->mach == bfd_mach_h8300sxn) ? 11 : 10) -- cgit v1.1