This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] target.c: Add support for Solaris realtime signals
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [RFA] target.c: Add support for Solaris realtime signals
- From: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- Date: Fri, 22 Sep 2000 23:48:14 MET DST
This patch adds support for Solaris realtime signals, they are modelled after
(ummh, more or less copied from) the REALTIME_LO/HI support.
Unfortunately I can't add a testsuite case to sigall.exp, as the definitions
of the signal numbers are dynamic.
* target.c (target_signal_from_host, do_target_signal_to_host):
Add support for Solaris realtime signals.
*** ./target.c.orig Sat Aug 5 11:37:53 2000
--- ./target.c Fri Sep 15 21:36:51 2000
***************
*** 1729,1734 ****
--- 1729,1746 ----
error ("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal");
}
#endif
+
+ #if defined (SIGRTMIN)
+ if (hostsig >= SIGRTMIN && hostsig <= SIGRTMAX)
+ {
+ /* This block of TARGET_SIGNAL_REALTIME value is in order. */
+ if (33 <= hostsig && hostsig <= 63)
+ return (enum target_signal)
+ (hostsig - 33 + (int) TARGET_SIGNAL_REALTIME_33);
+ else
+ error ("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal");
+ }
+ #endif
return TARGET_SIGNAL_UNKNOWN;
}
***************
*** 1984,1989 ****
--- 1996,2014 ----
}
#endif
#endif
+
+ #if defined (SIGRTMIN)
+ 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;
+ if (retsig >= SIGRTMIN && retsig <= SIGRTMAX)
+ return retsig;
+ }
+ #endif
*oursig_ok = 0;
return 0;
}
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de