aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2009-05-08 22:54:34 +0000
committerKevin Buettner <kevinb@redhat.com>2009-05-08 22:54:34 +0000
commitbba258adba6b3e9622c15584a9e7d1d1028393c2 (patch)
treeaf38a7a183eb54409271f0579c47d76c97abce5a
parent2cda8d2fb13f9501a8dbf0ca50fcb1161a919024 (diff)
downloadgdb-bba258adba6b3e9622c15584a9e7d1d1028393c2.zip
gdb-bba258adba6b3e9622c15584a9e7d1d1028393c2.tar.gz
gdb-bba258adba6b3e9622c15584a9e7d1d1028393c2.tar.bz2
* m32c/gdb-if.c (m32c_signal_to_host): Rename to
m32c_signal_to_target. Change signal return values from SIGILL, SIGTRAP, SIGSEGV, etc. to TARGET_SIGNAL_ILL, TARGET_SIGNAL_TRAP, TARGET_SIGNAL_SEGV, etc. Fix all callers.
-rw-r--r--sim/ChangeLog7
-rw-r--r--sim/m32c/gdb-if.c39
2 files changed, 18 insertions, 28 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog
index 8accec2..da87b14 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,10 @@
+2009-05-08 Kevin Buettner <kevinb@redhat.com>
+
+ * m32c/gdb-if.c (m32c_signal_to_host): Rename to
+ m32c_signal_to_target. Change signal return values from SIGILL,
+ SIGTRAP, SIGSEGV, etc. to TARGET_SIGNAL_ILL, TARGET_SIGNAL_TRAP,
+ TARGET_SIGNAL_SEGV, etc. Fix all callers.
+
2009-04-30 Anthony Green <green@moxielogic.com>
* MAINTAINERS: Add myself for the moxie port.
diff --git a/sim/m32c/gdb-if.c b/sim/m32c/gdb-if.c
index fbe067b..df30c6a 100644
--- a/sim/m32c/gdb-if.c
+++ b/sim/m32c/gdb-if.c
@@ -523,52 +523,35 @@ int siggnal;
/* Given a signal number used by the M32C bsp (that is, newlib),
- return a host signal number. (Oddly, the gdb/sim interface uses
- host signal numbers...) */
+ return a target signal number used by GDB. */
int
-m32c_signal_to_host (int m32c)
+m32c_signal_to_target (int m32c)
{
switch (m32c)
{
case 4:
-#ifdef SIGILL
- return SIGILL;
-#else
- return SIGSEGV;
-#endif
+ return TARGET_SIGNAL_ILL;
case 5:
- return SIGTRAP;
+ return TARGET_SIGNAL_TRAP;
case 10:
-#ifdef SIGBUS
- return SIGBUS;
-#else
- return SIGSEGV;
-#endif
+ return TARGET_SIGNAL_BUS;
case 11:
- return SIGSEGV;
+ return TARGET_SIGNAL_SEGV;
case 24:
-#ifdef SIGXCPU
- return SIGXCPU;
-#else
- break;
-#endif
+ return TARGET_SIGNAL_XCPU;
case 2:
- return SIGINT;
+ return TARGET_SIGNAL_INT;
case 8:
-#ifdef SIGFPE
- return SIGFPE;
-#else
- break;
-#endif
+ return TARGET_SIGNAL_FPE;
case 6:
- return SIGABRT;
+ return TARGET_SIGNAL_ABRT;
}
return 0;
@@ -588,7 +571,7 @@ handle_step (int rc)
else if (M32C_STOPPED (rc))
{
reason = sim_stopped;
- siggnal = m32c_signal_to_host (M32C_STOP_SIG (rc));
+ siggnal = m32c_signal_to_target (M32C_STOP_SIG (rc));
}
else
{