aboutsummaryrefslogtreecommitdiff
path: root/sim/h8300/compile.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-02-17 18:24:10 -0500
committerMike Frysinger <vapier@gentoo.org>2014-02-17 18:32:45 -0500
commitef3e8cf7d1d7849c2fb466bdc62b56336739cb90 (patch)
tree8ca232b2ef7a43e5ede0f81f6e8f5f9475ff7dbd /sim/h8300/compile.c
parentc395f86f51b18695c1b151ed92e41d7b596b0d12 (diff)
downloadfsf-binutils-gdb-ef3e8cf7d1d7849c2fb466bdc62b56336739cb90.zip
fsf-binutils-gdb-ef3e8cf7d1d7849c2fb466bdc62b56336739cb90.tar.gz
fsf-binutils-gdb-ef3e8cf7d1d7849c2fb466bdc62b56336739cb90.tar.bz2
sim: delete duplicate SIGINT handling
Many of the simulators change the SIGINT handler. E.g., moxie/interp.c: sigsave = signal (SIGINT, interrupt); However, this is unnecessary. remote-sim.h already provides an API for asynchronously stopping a sim; and both gdb and the drivers (run.c and nrun.c at least, I didn't check the others) install a SIGINT handler which calls this method. URL: https://sourceware.org/bugzilla/show_bug.cgi?id=16450 Reported-by: Tom Tromey <tromey@redhat.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/h8300/compile.c')
-rw-r--r--sim/h8300/compile.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 13d5cae..2c7316c 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -1859,15 +1859,6 @@ init_pointers (SIM_DESC sd)
}
}
-/* Grotty global variable for use by control_c signal handler. */
-static SIM_DESC control_c_sim_desc;
-
-static void
-control_c (int sig)
-{
- sim_engine_set_run_state (control_c_sim_desc, sim_stopped, SIGINT);
-}
-
int
sim_stop (SIM_DESC sd)
{
@@ -1901,7 +1892,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int cycles = 0;
int insts = 0;
int tick_start = get_now ();
- void (*prev) ();
int poll_count = 0;
int res;
int tmp;
@@ -1917,9 +1907,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
init_pointers (sd);
- control_c_sim_desc = sd;
- prev = signal (SIGINT, control_c);
-
if (step)
{
sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
@@ -4604,7 +4591,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
h8_set_exr (sd, (trace<<7) | intMask);
h8_set_mask (sd, oldmask);
- signal (SIGINT, prev);
}
int