diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-02-17 18:24:10 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-02-17 18:32:45 -0500 |
commit | ef3e8cf7d1d7849c2fb466bdc62b56336739cb90 (patch) | |
tree | 8ca232b2ef7a43e5ede0f81f6e8f5f9475ff7dbd /sim/moxie/interp.c | |
parent | c395f86f51b18695c1b151ed92e41d7b596b0d12 (diff) | |
download | gdb-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/moxie/interp.c')
-rw-r--r-- | sim/moxie/interp.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c index 314da4a..63dc8fc 100644 --- a/sim/moxie/interp.c +++ b/sim/moxie/interp.c @@ -157,12 +157,6 @@ set_initial_gprs () cpu.asregs.sregs[i] = 0; } -static void -interrupt () -{ - cpu.asregs.exception = SIGINT; -} - /* Write a 1 byte value to memory. */ static void INLINE @@ -258,11 +252,9 @@ sim_resume (sd, step, siggnal) word pc, opc; unsigned long long insts; unsigned short inst; - void (* sigsave)(); sim_cpu *scpu = STATE_CPU (sd, 0); /* FIXME */ address_word cia = CIA_GET (scpu); - sigsave = signal (SIGINT, interrupt); cpu.asregs.exception = step ? SIGTRAP: 0; pc = cpu.asregs.regs[PC_REGNO]; insts = cpu.asregs.insts; @@ -1022,8 +1014,6 @@ sim_resume (sd, step, siggnal) /* Hide away the things we've cached while executing. */ cpu.asregs.regs[PC_REGNO] = pc; cpu.asregs.insts += insts; /* instructions done ... */ - - signal (SIGINT, sigsave); } int |