aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/rx/ChangeLog6
-rw-r--r--sim/rx/gdb-if.c41
2 files changed, 18 insertions, 29 deletions
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index 8c5f84f..dc2e3e5 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-17 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb-if.c (rx_signal_to_host): Rename to
+ `rx_signal_to_gdb_signal'. Make static. Update all callers
+ to use new name. Use signal names from include/gdb/signals.h.
+
2013-09-23 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c
index 57d179c..4c4434c 100644
--- a/sim/rx/gdb-if.c
+++ b/sim/rx/gdb-if.c
@@ -650,52 +650,35 @@ int siggnal;
/* Given a signal number used by the RX bsp (that is, newlib),
- return a host signal number. (Oddly, the gdb/sim interface uses
- host signal numbers...) */
-int
-rx_signal_to_host (int rx)
+ return a target signal number used by GDB. */
+static int
+rx_signal_to_gdb_signal (int rx)
{
switch (rx)
{
case 4:
-#ifdef SIGILL
- return SIGILL;
-#else
- return SIGSEGV;
-#endif
+ return GDB_SIGNAL_ILL;
case 5:
- return SIGTRAP;
+ return GDB_SIGNAL_TRAP;
case 10:
-#ifdef SIGBUS
- return SIGBUS;
-#else
- return SIGSEGV;
-#endif
+ return GDB_SIGNAL_BUS;
case 11:
- return SIGSEGV;
+ return GDB_SIGNAL_SEGV;
case 24:
-#ifdef SIGXCPU
- return SIGXCPU;
-#else
- break;
-#endif
+ return GDB_SIGNAL_XCPU;
case 2:
- return SIGINT;
+ return GDB_SIGNAL_INT;
case 8:
-#ifdef SIGFPE
- return SIGFPE;
-#else
- break;
-#endif
+ return GDB_SIGNAL_FPE;
case 6:
- return SIGABRT;
+ return GDB_SIGNAL_ABRT;
}
return 0;
@@ -720,7 +703,7 @@ handle_step (int rc)
else if (RX_STOPPED (rc))
{
reason = sim_stopped;
- siggnal = rx_signal_to_host (RX_STOP_SIG (rc));
+ siggnal = rx_signal_to_gdb_signal (RX_STOP_SIG (rc));
}
else
{