aboutsummaryrefslogtreecommitdiff
path: root/gdb/signals
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-06-09 19:42:11 +0000
committerDaniel Jacobowitz <drow@false.org>2002-06-09 19:42:11 +0000
commit2f2cf1847f0372fa2c8559e6c6f9b9ac24419cdd (patch)
treef29ed322b815b1dc9607c7ae1d4a5e164193c090 /gdb/signals
parentcaaa3122d826d264e30046a5895fea2c8253c625 (diff)
downloadgdb-2f2cf1847f0372fa2c8559e6c6f9b9ac24419cdd.zip
gdb-2f2cf1847f0372fa2c8559e6c6f9b9ac24419cdd.tar.gz
gdb-2f2cf1847f0372fa2c8559e6c6f9b9ac24419cdd.tar.bz2
2002-06-09 Daniel Jacobowitz <drow@mvista.com>
* signals/signals.c (target_signal_from_host): Fix #ifdef SIGRTMIN case. (do_target_signal_to_host): Likewise.
Diffstat (limited to 'gdb/signals')
-rw-r--r--gdb/signals/signals.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/gdb/signals/signals.c b/gdb/signals/signals.c
index 643e450..0057e60 100644
--- a/gdb/signals/signals.c
+++ b/gdb/signals/signals.c
@@ -498,8 +498,11 @@ target_signal_from_host (int hostsig)
if (33 <= hostsig && hostsig <= 63)
return (enum target_signal)
(hostsig - 33 + (int) TARGET_SIGNAL_REALTIME_33);
- else if (hostsig == 64)
- return TARGET_SIGNAL_REALTIME_64;
+ else if (hostsig == 32)
+ return TARGET_SIGNAL_REALTIME_32;
+ else if (64 <= hostsig && hostsig <= 127)
+ return (enum target_signal)
+ (hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
else
error ("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal");
}
@@ -784,8 +787,21 @@ do_target_signal_to_host (enum target_signal oursig,
if (retsig >= SIGRTMIN && retsig <= SIGRTMAX)
return retsig;
}
- else if (oursig == TARGET_SIGNAL_REALTIME_64)
- return 64;
+ 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;
+ }
+ 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;
+ }
#endif
*oursig_ok = 0;
return 0;