aboutsummaryrefslogtreecommitdiff
path: root/sim/mcore
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/mcore
parentc395f86f51b18695c1b151ed92e41d7b596b0d12 (diff)
downloadgdb-ef3e8cf7d1d7849c2fb466bdc62b56336739cb90.zip
gdb-ef3e8cf7d1d7849c2fb466bdc62b56336739cb90.tar.gz
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/mcore')
-rw-r--r--sim/mcore/ChangeLog6
-rw-r--r--sim/mcore/interp.c10
2 files changed, 6 insertions, 10 deletions
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index 0208dc3..a034cde 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-17 Mike Frysinger <vapier@gentoo.org>
+
+ PR gdb/16450
+ * interp.c (interrupt): Delete.
+ (sim_resume): Delete signal(SIGINT) handling.
+
2013-09-23 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index 310f361..72c59f7 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -472,12 +472,6 @@ set_initial_gprs ()
cpu.gr[PARM4] = cpu.gr[0];
}
-static void
-interrupt ()
-{
- cpu.asregs.exception = SIGINT;
-}
-
/* Functions so that trapped open/close don't interfere with the
parent's functions. We say that we can't close the descriptors
that we didn't open. exit() and cleanup() get in trouble here,
@@ -762,7 +756,6 @@ sim_resume (sd, step, siggnal)
word ibuf;
word pc;
unsigned short inst;
- void (* sigsave)();
int memops;
int bonus_cycles;
int insts;
@@ -770,7 +763,6 @@ sim_resume (sd, step, siggnal)
int cycs;
word WLhash;
- sigsave = signal (SIGINT, interrupt);
cpu.asregs.exception = step ? SIGTRAP: 0;
pc = cpu.asregs.pc;
@@ -1709,8 +1701,6 @@ sim_resume (sd, step, siggnal)
cpu.asregs.cycles += insts; /* and each takes a cycle */
cpu.asregs.cycles += bonus_cycles; /* and extra cycles for branches */
cpu.asregs.cycles += memops * memcycles; /* and memop cycle delays */
-
- signal (SIGINT, sigsave);
}