aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/h8300
diff options
context:
space:
mode:
authorDhananjay Deshpande <dhananjayd@kpitcummins.com>2003-12-11 06:21:12 +0000
committerDhananjay Deshpande <dhananjayd@kpitcummins.com>2003-12-11 06:21:12 +0000
commit454d05118bc21bb4966c0cb13d3bfc526c26e3b8 (patch)
tree2710dbfbea877706f2abd2d6dc28101636aca660 /gdb/config/h8300
parent8f02783d3a649edcfc7bbce568918c39f1c844e9 (diff)
downloadgdb-454d05118bc21bb4966c0cb13d3bfc526c26e3b8.zip
gdb-454d05118bc21bb4966c0cb13d3bfc526c26e3b8.tar.gz
gdb-454d05118bc21bb4966c0cb13d3bfc526c26e3b8.tar.bz2
Fix GDB crash problem when object file of different H8 cpu is loaded
Diffstat (limited to 'gdb/config/h8300')
-rw-r--r--gdb/config/h8300/tm-h8300.h15
1 files changed, 4 insertions, 11 deletions
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)