This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [linux] Always ignore restart/cancellation signals
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Mon, 20 Feb 2006 12:01:47 -0500
- Subject: Re: [linux] Always ignore restart/cancellation signals
- References: <20051208142420.GA21882@nevyn.them.org>
On Thu, Dec 08, 2005 at 09:24:20AM -0500, Daniel Jacobowitz wrote:
> The comment is fairly self-explanatory. I guess I've always debugged
> failing cancellation tests with gdbserver, which hardwires these values
> already...
>
> Any objections?
There were a few but they faded after discussion, so I have retested
and committed this patch.
--
Daniel Jacobowitz
CodeSourcery
2006-02-20 Daniel Jacobowitz <dan@codesourcery.com>
* linux-nat.c (lin_thread_get_thread_signals): Default to __SIGRTMIN
and __SIGRTMIN + 1.
Index: gdb-6.4/gdb/linux-nat.c
===================================================================
--- gdb-6.4.orig/gdb/linux-nat.c 2005-11-03 14:51:40.000000000 -0500
+++ gdb-6.4/gdb/linux-nat.c 2005-12-07 21:44:12.000000000 -0500
@@ -3284,12 +3284,18 @@ lin_thread_get_thread_signals (sigset_t
sigemptyset (set);
restart = get_signo ("__pthread_sig_restart");
+ cancel = get_signo ("__pthread_sig_cancel");
+
+ /* LinuxThreads normally uses the first two RT signals, but in some legacy
+ cases may use SIGUSR1/SIGUSR2. NPTL always uses RT signals, but does
+ not provide any way for the debugger to query the signal numbers -
+ fortunately they don't change! */
+
if (restart == 0)
- return;
+ restart = __SIGRTMIN;
- cancel = get_signo ("__pthread_sig_cancel");
if (cancel == 0)
- return;
+ cancel = __SIGRTMIN + 1;
sigaddset (set, restart);
sigaddset (set, cancel);