From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16849 invoked by alias); 8 Dec 2005 14:24:24 -0000 Received: (qmail 16838 invoked by uid 22791); 8 Dec 2005 14:24:23 -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; Thu, 08 Dec 2005 14:24:22 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EkMh2-0005hF-Sm for gdb-patches@sourceware.org; Thu, 08 Dec 2005 09:24:20 -0500 Date: Thu, 08 Dec 2005 21:10:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: [linux] Always ignore restart/cancellation signals Message-ID: <20051208142420.GA21882@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: 2005-12/txt/msg00152.txt.bz2 The comment is fairly self-explanatory. I guess I've always debugged failing cancellation tests with gdbserver, which hardwires these values already... Any objections? -- Daniel Jacobowitz CodeSourcery, LLC 2005-12-07 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);