aboutsummaryrefslogtreecommitdiff
path: root/sim/sh
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/sh
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/sh')
-rw-r--r--sim/sh/ChangeLog6
-rw-r--r--sim/sh/interp.c13
2 files changed, 6 insertions, 13 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index bb57ca1..8c1b09b 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-17 Mike Frysinger <vapier@gentoo.org>
+
+ PR gdb/16450
+ * interp.c (control_c): Delete.
+ (sim_resume): Delete signal(SIGINT) handling.
+
2013-09-23 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index fa77e5f..5689511 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -1261,16 +1261,6 @@ trap (i, regs, insn_ptr, memory, maskl, maskw, endianw)
return 0;
}
-void
-control_c (sig, code, scp, addr)
- int sig;
- int code;
- char *scp;
- char *addr;
-{
- raise_exception (SIGINT);
-}
-
static int
div1 (R, iRn2, iRn1/*, T*/)
int *R;
@@ -1979,7 +1969,6 @@ sim_resume (sd, step, siggnal)
register int endianw = global_endianw;
int tick_start = get_now ();
- void (*prev) ();
void (*prev_fpe) ();
register unsigned short *jump_table = sh_jump_table;
@@ -1996,7 +1985,6 @@ sim_resume (sd, step, siggnal)
register unsigned char *memory;
register unsigned int sbit = ((unsigned int) 1 << 31);
- prev = signal (SIGINT, control_c);
prev_fpe = signal (SIGFPE, SIG_IGN);
init_pointers ();
@@ -2134,7 +2122,6 @@ sim_resume (sd, step, siggnal)
}
signal (SIGFPE, prev_fpe);
- signal (SIGINT, prev);
}
int