aboutsummaryrefslogtreecommitdiff
path: root/sim/microblaze/interp.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/microblaze/interp.c
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/microblaze/interp.c')
-rw-r--r--sim/microblaze/interp.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c
index 9e9ed1f..4907b73 100644
--- a/sim/microblaze/interp.c
+++ b/sim/microblaze/interp.c
@@ -368,12 +368,6 @@ set_initial_gprs ()
}
-static void
-interrupt ()
-{
- CPU.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,
@@ -515,7 +509,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int needfetch;
word inst;
enum microblaze_instr op;
- void (*sigsave)();
int memops;
int bonus_cycles;
int insts;
@@ -532,7 +525,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
short num_delay_slot; /* UNUSED except as reqd parameter */
enum microblaze_instr_type insn_type;
- sigsave = signal (SIGINT, interrupt);
CPU.exception = step ? SIGTRAP : 0;
memops = 0;
@@ -697,8 +689,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
CPU.cycles += insts; /* and each takes a cycle */
CPU.cycles += bonus_cycles; /* and extra cycles for branches */
CPU.cycles += memops; /* and memop cycle delays */
-
- signal (SIGINT, sigsave);
}