aboutsummaryrefslogtreecommitdiff
path: root/gdb
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 /gdb
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 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/remote-sim.c17
2 files changed, 11 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2246d8d..d630731 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-28 Mark Mitchell <mark@codesourcery.com>
+
+ * remote-sim.c (gdbsim_wait): Pass target signal numbers to
+ sim_resume. Expect target signal numbers from sim_stop_reason.
+
2005-11-27 Christopher Faylor <cgf@timesys.com>
* win32-nat.c (env_sort): New function.
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 6341b3c..e6fc0bd 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -674,8 +674,7 @@ gdbsim_wait (ptid_t ptid, struct target_waitstatus *status)
#else
prev_sigint = signal (SIGINT, gdbsim_cntrl_c);
#endif
- sim_resume (gdbsim_desc, resume_step,
- target_signal_to_host (resume_siggnal));
+ sim_resume (gdbsim_desc, resume_step, resume_siggnal);
signal (SIGINT, prev_sigint);
resume_step = 0;
@@ -690,24 +689,20 @@ gdbsim_wait (ptid_t ptid, struct target_waitstatus *status)
case sim_stopped:
switch (sigrc)
{
- case SIGABRT:
+ case TARGET_SIGNAL_ABRT:
quit ();
break;
- case SIGINT:
- case SIGTRAP:
+ case TARGET_SIGNAL_INT:
+ case TARGET_SIGNAL_TRAP:
default:
status->kind = TARGET_WAITKIND_STOPPED;
- /* The signal in sigrc is a host signal. That probably
- should be fixed. */
- status->value.sig = target_signal_from_host (sigrc);
+ status->value.sig = sigrc;
break;
}
break;
case sim_signalled:
status->kind = TARGET_WAITKIND_SIGNALLED;
- /* The signal in sigrc is a host signal. That probably
- should be fixed. */
- status->value.sig = target_signal_from_host (sigrc);
+ status->value.sig = sigrc;
break;
case sim_running:
case sim_polling: