aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-03-26 20:44:39 +0000
committerDaniel Jacobowitz <drow@false.org>2003-03-26 20:44:39 +0000
commitf541410f487c165d0b050bcd64b4c9abf568f2da (patch)
treecebdba317357345c5ea703c6160093412d7a1abe
parent69f567ae0a500e14c7e8806df30429d599d1f374 (diff)
downloadgdb-f541410f487c165d0b050bcd64b4c9abf568f2da.zip
gdb-f541410f487c165d0b050bcd64b4c9abf568f2da.tar.gz
gdb-f541410f487c165d0b050bcd64b4c9abf568f2da.tar.bz2
* signals/signals.c (do_target_signal_to_host): Correct realtime
signal range test.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/signals/signals.c21
2 files changed, 14 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 24f5b8a..8220a0e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2003-03-26 Daniel Jacobowitz <drow@mvista.com>
+ * signals/signals.c (do_target_signal_to_host): Correct realtime
+ signal range test.
+
+2003-03-26 Daniel Jacobowitz <drow@mvista.com>
+
* breakpoint.c (handle_gnu_4_16_catch_command, get_catch_sals)
(struct sal_chain, map_catch_names): Remove.
(catch_exception_command_1): Don't call
diff --git a/gdb/signals/signals.c b/gdb/signals/signals.c
index ba5e7ea..ca46a9e 100644
--- a/gdb/signals/signals.c
+++ b/gdb/signals/signals.c
@@ -518,6 +518,8 @@ static int
do_target_signal_to_host (enum target_signal oursig,
int *oursig_ok)
{
+ int retsig;
+
*oursig_ok = 1;
switch (oursig)
{
@@ -742,36 +744,31 @@ do_target_signal_to_host (enum target_signal oursig,
default:
#if defined (REALTIME_LO)
- if (oursig < REALTIME_LO || oursig >= REALTIME_HI)
- {
- *oursig_ok = 0;
- return 0;
- }
+ retsig = 0;
if (oursig >= TARGET_SIGNAL_REALTIME_33
&& oursig <= TARGET_SIGNAL_REALTIME_63)
{
/* This block of signals is continuous, and
TARGET_SIGNAL_REALTIME_33 is 33 by definition. */
- int retsig =
- (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + 33;
- return retsig;
+ retsig = (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + 33;
}
else if (oursig == TARGET_SIGNAL_REALTIME_32)
{
/* TARGET_SIGNAL_REALTIME_32 isn't contiguous with
TARGET_SIGNAL_REALTIME_33. It is 32 by definition. */
- return 32;
+ retsig = 32;
}
else if (oursig >= TARGET_SIGNAL_REALTIME_64
&& oursig <= TARGET_SIGNAL_REALTIME_127)
{
/* This block of signals is continuous, and
TARGET_SIGNAL_REALTIME_64 is 64 by definition. */
- int retsig =
- (int) oursig - (int) TARGET_SIGNAL_REALTIME_64 + 64;
- return retsig;
+ retsig = (int) oursig - (int) TARGET_SIGNAL_REALTIME_64 + 64;
}
+
+ if (retsig >= REALTIME_LO && retsig < REALTIME_HI)
+ return retsig;
#endif
*oursig_ok = 0;