From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Jenkins To: "'Peter.Schauer'" , kettenis@wins.uva.nl Cc: Jeff Jenkins , gdb@sourceware.cygnus.com Subject: RE: Real-Time signals & GDB Date: Mon, 11 Sep 2000 09:10:00 -0000 Message-id: <27A2DAA6CAD9D311BF970050DACB2250013E575E@mail.jetstream.com> X-SW-Source: 2000-09/msg00103.html 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 > 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