aboutsummaryrefslogtreecommitdiff
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
commitaba6488e0b73756f31f154d12a228baa82a68d8a (patch)
treea341ee1db97cb96dc8145f58351a1e09a20cde9b /sim/arm/wrapper.c
parent274b5ecdd76b658da77bc87fb720d79e485a6b2f (diff)
downloadgdb-aba6488e0b73756f31f154d12a228baa82a68d8a.zip
gdb-aba6488e0b73756f31f154d12a228baa82a68d8a.tar.gz
gdb-aba6488e0b73756f31f154d12a228baa82a68d8a.tar.bz2
* 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 9736add..4133110 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;
}