This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RE: Real-Time signals & GDB
- To: "'Peter.Schauer'" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>, kettenis at wins dot uva dot nl
- Subject: RE: Real-Time signals & GDB
- From: Jeff Jenkins <jjenkins at jetstream dot com>
- Date: Mon, 11 Sep 2000 09:08:35 -0700
- Cc: Jeff Jenkins <jjenkins at jetstream dot com>, gdb at sourceware dot cygnus dot com
Ahhh! How nice! This seems to work! It recognizes my SIG39 real-time
event and delivers it to my waiting thread!
Thanks a bunch for the patch! I now have a useful debugger! : )
-- jrj
-----Original Message-----
From: Peter.Schauer
[mailto:Peter.Schauer@regent.e-technik.tu-muenchen.de]
Sent: Sunday, September 10, 2000 10:20 AM
To: kettenis@wins.uva.nl
Cc: jjenkins@jetstream.com; gdb@sourceware.cygnus.com
Subject: Re: Real-Time signals & GDB
Please try the following (lightly tested) patch and let me know if there
are any more problems with realtime signals.
*** gdb-5.0/gdb/target.c.orig Fri Apr 28 19:09:03 2000
--- gdb-5.0/gdb/target.c Sun Sep 10 17:15:30 2000
***************
*** 1852,1857 ****
--- 1852,1869 ----
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;
}
***************
*** 2107,2112 ****
--- 2119,2136 ----
}
#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;
}
> From: Jeff Jenkins <jjenkins@jetstream.com>
> Date: Wed, 6 Sep 2000 08:14:16 -0700
>
> I downloaded gdb 5.0, and successfully compiled it for Solaris 7/SPARC.
> However, the same problem persists as was present under 4.18.
>
> When I send a real-time signal from one thread to another thread, gdb
halts
> with the following message:
>
> "Program received signal ?, Unknown signal.
> [Switching to LWP 7]
> 0xfef93224 in _libc_sigtimedwait () from /usr/lib/libc.so.1"
>
> Looks like real-time signals aren't supported for Solaris. Patches to
> make it work are probably welcome :-).
>
> Mark
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de