From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9574 invoked by alias); 20 Feb 2006 17:01:52 -0000 Received: (qmail 9565 invoked by uid 22791); 20 Feb 2006 17:01:51 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 20 Feb 2006 17:01:49 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FBEPz-0004xX-Ne for gdb-patches@sourceware.org; Mon, 20 Feb 2006 12:01:47 -0500 Date: Mon, 20 Feb 2006 17:01:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: [linux] Always ignore restart/cancellation signals Message-ID: <20060220170147.GG16058@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20051208142420.GA21882@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051208142420.GA21882@nevyn.them.org> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00365.txt.bz2 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 * 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);