diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-02-09 05:08:42 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-02-09 05:08:42 +0000 |
commit | eac2674e056f5bbd1c0b1a54b91a53b9c10d4f36 (patch) | |
tree | 24a819db0265d1d2bf70be3b1bbdcd26289402c6 /sim/common | |
parent | 7270622b6f5a3a936f71b8f0545407c06aa8030e (diff) | |
download | gdb-eac2674e056f5bbd1c0b1a54b91a53b9c10d4f36.tar.gz |
Report SIGBUS and halt simulation when ld/st detect a misaligned address.
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 5 | ||||
-rw-r--r-- | sim/common/run.c | 16 |
2 files changed, 15 insertions, 6 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 3d190a5209e..9aeba034293 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -151,6 +151,11 @@ Mon Sep 20 21:44:06 1999 Geoffrey Keating <geoffk@cygnus.com> * sim-fpu.c (i2fpu): Keep the guard bits sticky when converting large values. +Tue Feb 8 16:33:48 2000 Andrew Cagney <cagney@b1.cygnus.com> + + * run.c (main): Check the sim_stop_reason and only halt simulation + when a valid stop condition is identified. + Wed Sep 15 14:12:37 1999 Andrew Cagney <cagney@b1.cygnus.com> * hw-tree.c, hw-properties.c, hw-instances.c: Include "sim-io.h". diff --git a/sim/common/run.c b/sim/common/run.c index a3e38a8e0b8..1a4e96908f1 100644 --- a/sim/common/run.c +++ b/sim/common/run.c @@ -231,26 +231,30 @@ main (ac, av) if (sim_create_inferior (sd, abfd, prog_args, NULL) == SIM_RC_FAIL) exit (1); - prev_sigint = signal (SIGINT, cntrl_c); if (trace) { int done = 0; + prev_sigint = signal (SIGINT, cntrl_c); while (!done) { done = sim_trace (sd); } + signal (SIGINT, prev_sigint); } else { - sim_resume (sd, 0, 0); + do + { + prev_sigint = signal (SIGINT, cntrl_c); + sim_resume (sd, 0, sigrc); + signal (SIGINT, prev_sigint); + sim_stop_reason (sd, &reason, &sigrc); + } + while (reason == sim_stopped && sigrc != SIGINT); } - signal (SIGINT, prev_sigint); if (verbose) sim_info (sd, 0); - - sim_stop_reason (sd, &reason, &sigrc); - sim_close (sd, 0); /* If reason is sim_exited, then sigrc holds the exit code which we want |