From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2569 invoked by alias); 24 Jan 2006 21:52:18 -0000 Received: (qmail 2551 invoked by uid 22791); 24 Jan 2006 21:52:16 -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; Tue, 24 Jan 2006 21:52:15 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F1W5C-0007Jn-QO; Tue, 24 Jan 2006 16:52:10 -0500 Date: Tue, 24 Jan 2006 21:52:00 -0000 From: Daniel Jacobowitz To: Girish Shilamkar Cc: gdb-patches@sources.redhat.com Subject: Re: [Patch] Mark the thread_event breakpoint as "not inserted" before calling thread_mourn_inferior Message-ID: <20060124215210.GA27626@nevyn.them.org> Mail-Followup-To: Girish Shilamkar , gdb-patches@sources.redhat.com References: <1137512294.3217.29.camel@krypton> <20060117154004.GA3672@nevyn.them.org> <1137575670.3221.17.camel@krypton> <20060118135735.GA3154@nevyn.them.org> <1137766638.3225.40.camel@krypton> <20060120143507.GA2794@nevyn.them.org> <1138008291.3221.19.camel@krypton> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1138008291.3221.19.camel@krypton> 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-01/txt/msg00382.txt.bz2 On Mon, Jan 23, 2006 at 02:54:51PM +0530, Girish Shilamkar wrote: > #3 0x0809058c in ps_lgetregs (ph=0xf6fde6a0, lwpid=29054, > gregset=0xfee6383c) > at ../../src/gdb/proc-service.c:236 > #4 0xf6db26b2 in td_ta_map_lwp2thr () from /lib/tls/libthread_db.so.1 > #5 0xf6db3872 in td_thr_validate () from /lib/tls/libthread_db.so.1 > #6 0x08091c1e in thread_db_thread_alive (ptid= > {pid = 29054, lwp = 29061, tid = -193094736}) > at ../../src/gdb/linux-thread-db.c:1135 This is the unexpected bit; not sure why it doesn't happen for me, but I am not going to investigate further now. > > Try moving remove_thread_event_breakpoints below the call > > to target_beneath->to_mourn_inferior (). > > > It works , I have verified it on FC3 & FC4. I have attached the patch. Thanks for testing it. I've checked in the attached after testing on x86_64-pc-linux-gnu. -- Daniel Jacobowitz CodeSourcery 2006-01-24 Daniel Jacobowitz * linux-thread-db.c (thread_db_mourn_inferior): Remove breakpoints after mourning the inferior. Index: linux-thread-db.c =================================================================== RCS file: /cvs/src/src/gdb/linux-thread-db.c,v retrieving revision 1.13 diff -u -p -r1.13 linux-thread-db.c --- linux-thread-db.c 17 Jan 2006 14:57:43 -0000 1.13 +++ linux-thread-db.c 24 Jan 2006 21:49:26 -0000 @@ -1104,14 +1104,16 @@ thread_db_post_startup_inferior (ptid_t static void thread_db_mourn_inferior (void) { - remove_thread_event_breakpoints (); - /* Forget about the child's process ID. We shouldn't need it anymore. */ proc_handle.pid = 0; target_beneath->to_mourn_inferior (); + /* Delete the old thread event breakpoints. Do this after mourning + the inferior, so that we don't try to uninsert them. */ + remove_thread_event_breakpoints (); + /* Detach thread_db target ops. */ unpush_target (&thread_db_ops); using_thread_db = 0;