summaryrefslogtreecommitdiff
path: root/sim/arm/wrapper.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-11-28 18:33:03 +0000
committerMark Mitchell <mark@codesourcery.com>2005-11-28 18:33:03 +0000
commit28fca399292ab16081dbc11046e7e87827ea6fb1 (patch)
tree3ecf4145bcf2e33fc85105e5f737a046377cec02 /sim/arm/wrapper.c
parent4b632ac9489ca838e2c370d603da41492da09420 (diff)
downloadgdb-28fca399292ab16081dbc11046e7e87827ea6fb1.tar.gz
* remote-sim.c (gdbsim_wait): Pass target signal numbers to
sim_resume. Expect target signal numbers from sim_stop_reason. * wrapper.c (gdb/signals.h): Include it. (SIGTRAP): Don't define. (SIGBUS): Likewise. (sim_stop_reason): Use TARGET_SIGNAL_* instead of SIG*. * sim-reason.c (sim_stop_reason): Use sim_signal_to_target, not sim_signal_to_host. * sim-signal.c (sim_signal_to_host): Fix typo. (sim_signal_to_target): New function. * interp.c (gdb/signals.h): Include it. (sim_stop_reason): Use TARGET_SIGNAL_*. * interf.c: (gdb/signals.h): Include it. (sim_stop_reason): Use TARGET_SIGNAL_*. * sim_calls.c (gdb/signals.h): Include it. (sim_stop_reason): Use TARGET_SIGNAL_*. * psim.c (cntrl_c_simulation): Use TARGET_SIGNAL_*.
Diffstat (limited to 'sim/arm/wrapper.c')
-rw-r--r--sim/arm/wrapper.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index 9736add9b11..4133110a54a 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -37,14 +37,7 @@
#include "sim-utils.h"
#include "run-sim.h"
#include "gdb/sim-arm.h"
-
-#ifndef SIGTRAP
-#define SIGTRAP 5
-#endif
-
-#ifndef SIGBUS
-#define SIGBUS SIGSEGV
-#endif
+#include "gdb/signals.h"
host_callback *sim_callback;
@@ -910,7 +903,7 @@ sim_stop_reason (sd, reason, sigrc)
if (stop_simulator)
{
*reason = sim_stopped;
- *sigrc = SIGINT;
+ *sigrc = TARGET_SIGNAL_INT;
}
else if (state->EndCondition == 0)
{
@@ -921,10 +914,10 @@ sim_stop_reason (sd, reason, sigrc)
{
*reason = sim_stopped;
if (state->EndCondition == RDIError_BreakpointReached)
- *sigrc = SIGTRAP;
+ *sigrc = TARGET_SIGNAL_TRAP;
else if ( state->EndCondition == RDIError_DataAbort
|| state->EndCondition == RDIError_AddressException)
- *sigrc = SIGBUS;
+ *sigrc = TARGET_SIGNAL_BUS;
else
*sigrc = 0;
}