summaryrefslogtreecommitdiff
path: root/sim/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
commitd98ab7966e8986e99195fb07fb95327f3a267288 (patch)
tree12f495682f928df1f82733bbf85796b9e57c8546 /sim/h8300
parent3891051cb41d6d243a4aa686d176cad062c2db42 (diff)
downloadgdb-d98ab7966e8986e99195fb07fb95327f3a267288.tar.gz
Fix GDB crash problem when object file of different H8 cpu is loaded
Diffstat (limited to 'sim/h8300')
-rw-r--r--sim/h8300/ChangeLog4
-rw-r--r--sim/h8300/compile.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 4d9f33cf0d4..7aa1a75af30 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,7 @@
+2003-12-11 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
+
+ * compile.c (set_h8300h): Initialize globals to zero.
+
2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
* compile.c (h8300_normal_mode): New.
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index f123878f278..462240ce145 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -4930,6 +4930,8 @@ set_h8300h (unsigned long machine)
This function being replaced by a sim_open:ARGV configuration
option. */
+ h8300hmode = h8300smode = h8300sxmode = h8300_normal_mode = 0;
+
if (machine == bfd_mach_h8300sx || machine == bfd_mach_h8300sxn)
h8300sxmode = 1;