From ef3e8cf7d1d7849c2fb466bdc62b56336739cb90 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 17 Feb 2014 18:24:10 -0500 Subject: 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 Signed-off-by: Mike Frysinger --- sim/microblaze/ChangeLog | 6 ++++++ sim/microblaze/interp.c | 10 ---------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'sim/microblaze') diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index 7a3c774..fe6add2 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,9 @@ +2014-02-17 Mike Frysinger + + PR gdb/16450 + * interp.c (interrupt): Delete. + (sim_resume): Delete signal(SIGINT) handling. + 2013-09-23 Alan Modra * configure: Regenerate. 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); } -- cgit v1.1