From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19689 invoked by alias); 16 Nov 2005 14:58:25 -0000 Received: (qmail 19304 invoked by uid 22791); 16 Nov 2005 14:58:21 -0000 Received: from fra-del-02.spheriq.net (HELO fra-del-02.spheriq.net) (195.46.51.98) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 16 Nov 2005 14:58:21 +0000 Received: from fra-out-01.spheriq.net (fra-out-01.spheriq.net [195.46.51.129]) by fra-del-02.spheriq.net with ESMTP id jAGEwEQx005273 for ; Wed, 16 Nov 2005 14:58:14 GMT Received: from fra-cus-01.spheriq.net (fra-cus-01.spheriq.net [195.46.51.37]) by fra-out-01.spheriq.net with ESMTP id jAGEwB8l012144 for ; Wed, 16 Nov 2005 14:58:13 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-01.spheriq.net with ESMTP id jAGEw3WI011879 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 16 Nov 2005 14:58:07 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 613A0DA8C; Wed, 16 Nov 2005 14:54:52 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id 0CD1E47536; Wed, 16 Nov 2005 14:57:51 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C59B3759AE; Wed, 16 Nov 2005 14:57:50 +0000 (UTC) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3A18247527; Wed, 16 Nov 2005 14:57:50 +0000 (GMT) Received: from [164.129.15.13] (terrorhawk.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CGZ37650 (AUTH "andrew stubbs"); Wed, 16 Nov 2005 14:54:50 GMT Message-ID: <437B47A1.4040705@st.com> Date: Wed, 16 Nov 2005 16:23:00 -0000 From: Andrew STUBBS User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Disable thread specific breakpoints when thread dies References: <43723446.7000903@st.com> <20051113184515.GG3599@nevyn.them.org> <437875B0.4000007@st.com> <20051114155659.GA25717@nevyn.them.org> <437A19DE.6040905@st.com> In-Reply-To: <437A19DE.6040905@st.com> Content-Type: multipart/mixed; boundary="------------010802010801020607080602" X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.1.07 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-11/txt/msg00232.txt.bz2 This is a multi-part message in MIME format. --------------010802010801020607080602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 121 Sorry, I sent the wrong version of the patch. The attached has the diagnosic I used to test it removed. Thanks Andrew --------------010802010801020607080602 Content-Type: text/plain; name="thread-break-2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="thread-break-2.patch" Content-length: 909 2005-11-16 Andrew Stubbs * breakpoint.c (insert_breakpoints): Check that a thread exists before inserting thread specific breakpoints. Index: src/gdb/breakpoint.c =================================================================== --- src.orig/gdb/breakpoint.c 2005-11-15 14:13:56.000000000 +0000 +++ src/gdb/breakpoint.c 2005-11-15 15:51:50.000000000 +0000 @@ -1142,6 +1142,12 @@ insert_breakpoints (void) if (!breakpoint_enabled (b->owner)) continue; + /* There is no point inserting thread-specific breakpoints if the + thread no longer exists. */ + if (b->owner->thread != -1 + && !target_thread_alive(thread_id_to_pid(b->owner->thread))) + continue; + /* FIXME drow/2003-10-07: This code should be pushed elsewhere when hardware watchpoints are split into multiple loc breakpoints. */ if ((b->loc_type == bp_loc_hardware_watchpoint --------------010802010801020607080602--