public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* RE: Real-Time signals & GDB
@ 2000-09-04 17:54 Jeff Jenkins
  2000-09-04 21:04 ` Mark Kettenis
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Jenkins @ 2000-09-04 17:54 UTC (permalink / raw)
  To: Jeff Jenkins, 'Gdb (E-mail) '

 Sorry that I didn't include this information initally.  It was the second
time I posted a similar question.

I am using gdb 4.18 on Solaris 7/SPARC UltraIII.

When I send an RT signal to another thread in my process gdb halts and
complains that it received an unknown ? signal.  When I continue, it fails
to deliver the signal.  The signal I am typically sending is RT signal 39 or
40.  Depends on the thread.

I have tried using handle all to handle ALL threads...I want them delivered
to my process so that I may handle them.  I do have other threads in
sigwaitinfo() calls waiting on RT signal 39 & 40.  

-- jrj

-----Original Message-----
From: Jeff Jenkins
To: Gdb (E-mail)
Sent: 9/1/00 11:17 AM
Subject: Real-Time signals & GDB

Anyone here know how to get GDB to properly handle RT signals?  When I
queue a RT signal, GDB complains that it received an unknown signal and
fails to deliever it to the process. Is there something specific I need
to do such that GDB will handle RT signals?
 
Thanks!
 
-- jrj

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Real-Time signals & GDB
  2000-09-04 17:54 Real-Time signals & GDB Jeff Jenkins
@ 2000-09-04 21:04 ` Mark Kettenis
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Kettenis @ 2000-09-04 21:04 UTC (permalink / raw)
  To: jjenkins; +Cc: jjenkins, gdb

   From: Jeff Jenkins <jjenkins@jetstream.com>
   Date: Mon, 4 Sep 2000 17:53:34 -0700 

   I am using gdb 4.18 on Solaris 7/SPARC UltraIII.

Try 5.0 (if you can get it to compile).  

Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Real-Time signals & GDB
@ 2000-09-11  9:10 Jeff Jenkins
  0 siblings, 0 replies; 8+ messages in thread
From: Jeff Jenkins @ 2000-09-11  9:10 UTC (permalink / raw)
  To: 'Peter.Schauer', kettenis; +Cc: Jeff Jenkins, gdb

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Real-Time signals & GDB
  2000-09-07  1:41 ` Mark Kettenis
@ 2000-09-10  8:20   ` Peter.Schauer
  0 siblings, 0 replies; 8+ messages in thread
From: Peter.Schauer @ 2000-09-10  8:20 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: jjenkins, 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Real-Time signals & GDB
  2000-09-06  8:15 Jeff Jenkins
@ 2000-09-07  1:41 ` Mark Kettenis
  2000-09-10  8:20   ` Peter.Schauer
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Kettenis @ 2000-09-07  1:41 UTC (permalink / raw)
  To: jjenkins; +Cc: jjenkins, jjenkins, gdb

   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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Real-Time signals & GDB
@ 2000-09-06  8:15 Jeff Jenkins
  2000-09-07  1:41 ` Mark Kettenis
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Jenkins @ 2000-09-06  8:15 UTC (permalink / raw)
  To: 'Mark Kettenis', Jeff Jenkins; +Cc: Jeff Jenkins, gdb

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"

I had initally issued a "handle all", so when I continue, I expect the
signal to get passed on to my process.  I do have a thread in a
sigwaitinfo() for the RT signal I just sent.  Why won't gdb pass this signal
to my process?

-- jrj

-----Original Message-----
From: Mark Kettenis [ mailto:kettenis@wins.uva.nl ]
Sent: Monday, September 04, 2000 9:04 PM
To: jjenkins@jetstream.com
Cc: jjenkins@jetstream.com; gdb@sourceware.cygnus.com
Subject: Re: Real-Time signals & GDB


   From: Jeff Jenkins <jjenkins@jetstream.com>
   Date: Mon, 4 Sep 2000 17:53:34 -0700 

   I am using gdb 4.18 on Solaris 7/SPARC UltraIII.

Try 5.0 (if you can get it to compile).  

Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Real-Time signals & GDB
  2000-09-01 11:19 Jeff Jenkins
@ 2000-09-01 11:25 ` Mark Kettenis
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Kettenis @ 2000-09-01 11:25 UTC (permalink / raw)
  To: jjenkins; +Cc: gdb

   From: Jeff Jenkins <jjenkins@jetstream.com>
   Date: Fri, 1 Sep 2000 11:17:51 -0700 

   Anyone here know how to get GDB to properly handle RT signals?  When I queue
   a RT signal, GDB complains that it received an unknown signal and fails to
   deliever it to the process. Is there something specific I need to do such
   that GDB will handle RT signals?

Which GDB version?  Which platform?  GDB handles RT signals just fine
Linux/x86.

Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Real-Time signals & GDB
@ 2000-09-01 11:19 Jeff Jenkins
  2000-09-01 11:25 ` Mark Kettenis
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Jenkins @ 2000-09-01 11:19 UTC (permalink / raw)
  To: Gdb (E-mail)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

Anyone here know how 
to get GDB to properly handle RT signals?  When I queue a RT signal, GDB 
complains that it received an unknown signal and fails to deliever it to the 
process. Is there something specific I need to do such that GDB will handle 
RT signals?
 
Thanks!
 
-- 
jrj

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-09-11  9:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-04 17:54 Real-Time signals & GDB Jeff Jenkins
2000-09-04 21:04 ` Mark Kettenis
  -- strict thread matches above, loose matches on Subject: below --
2000-09-11  9:10 Jeff Jenkins
2000-09-06  8:15 Jeff Jenkins
2000-09-07  1:41 ` Mark Kettenis
2000-09-10  8:20   ` Peter.Schauer
2000-09-01 11:19 Jeff Jenkins
2000-09-01 11:25 ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).