Real-Time signals & GDB

Peter.Schauer Peter.Schauer@regent.e-technik.tu-muenchen.de
Sun Sep 10 08:20:00 GMT 2000


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


More information about the Gdb mailing list