From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24144 invoked by alias); 14 Nov 2005 15:57:05 -0000 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 Received: (qmail 24132 invoked by uid 22791); 14 Nov 2005 15:57:02 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31-dev) with ESMTP; Mon, 14 Nov 2005 15:57:02 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EbghX-0006iQ-VS; Mon, 14 Nov 2005 10:57:00 -0500 Date: Mon, 14 Nov 2005 17:11:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Disable thread specific breakpoints when thread dies Message-ID: <20051114155659.GA25717@nevyn.them.org> Mail-Followup-To: Andrew STUBBS , gdb-patches@sources.redhat.com References: <43723446.7000903@st.com> <20051113184515.GG3599@nevyn.them.org> <437875B0.4000007@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <437875B0.4000007@st.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-11/txt/msg00190.txt.bz2 On Mon, Nov 14, 2005 at 11:32:00AM +0000, Andrew STUBBS wrote: > Daniel Jacobowitz wrote: > >But about the actual patch... > > > >I'd like to minimize the amount that GDB plays with the user visible > >state of breakpoints. Can we arrange to just not insert breakpoints, > >if they are thread-specific to a dead thread? I think that'll work > >too. > > So you want to disable it 'unofficially'? I suppose that would be > preferable, but I wouldn't know that best way to achieve it. I'll have a > look though. I'm thinking about a check in insert_breakpoints, just before calling insert_bp_location. By the !breakpoint_enabled. This may have other side effects, so it would need testing. > GDB already plays with watchpoints (deletes them in fact). At least it > did in 6.3. That said I wouldn't complain if somebody 'fixed' them so > that they were reinstated when the program returned to the right context. Yes, exactly. Just to clarify: yes, I acknowledge that what you're doing here is similar to many other places that GDB messes with the state, e.g. shlib_disabled. But I've been looking on and off at overhauling our breakpoint management, and this is one of the bits that I really want to go away. If we want to display to the user "sorry, right now I believe this breakpoint can not/should not be inserted, so I'm not going to", then it shouldn't show up as "disabled". I want to decrease the total number of interactions. -- Daniel Jacobowitz CodeSourcery, LLC