From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13660 invoked by alias); 30 Nov 2007 10:11:12 -0000 Received: (qmail 13651 invoked by uid 22791); 30 Nov 2007 10:11:11 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 30 Nov 2007 10:11:06 +0000 Received: (qmail 13394 invoked from network); 30 Nov 2007 10:11:05 -0000 Received: from unknown (HELO wind.local) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 30 Nov 2007 10:11:05 -0000 From: Vladimir Prus To: Michael Snyder Subject: Re: Keeping breakpoints inserted Date: Fri, 30 Nov 2007 10:11:00 -0000 User-Agent: KMail/1.9.6 References: <200711292224.23659.vladimir@codesourcery.com> <1196385134.2501.144.camel@localhost.localdomain> In-Reply-To: <1196385134.2501.144.camel@localhost.localdomain> Cc: gdb@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711301311.01113.vladimir@codesourcery.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00284.txt.bz2 On Friday 30 November 2007 04:12:14 you wrote: > On Thu, 2007-11-29 at 22:24 +0300, Vladimir Prus wrote: > > One of the infrastructure bits necessary for the non-stop threads > > debugging is always-inserted-breakpoints mode. If GDB has stopped > > one thread, and other threads are running, we want those other threads > > to still hit breakpoints and watchpoints. However, current GDB removes > > all breakpoints from the target before giving user a prompt, and this > > has to change. > > > > I've spend quite time examining breakpoint.c and infrun.c and > > cleaning/localizing the decisions as to when breakpoints are > > inserted/removed, and I believe I now have a fully workable plan > > to make breakpoints always inserted. > > > > [...] > > > > Anybody has comments on this approach? > > Might there be a user preference, under some circumstances, > to NOT have them inserted while some threads run and some > are stopped? Honestly, originally I planned to have breakpoints always inserted, unconditionally. Unfortunately, that does not work with remote targets -- since the Z0 packet may use memory breakpoints, and remote protocol does not requires the memory read packet to return original memory content, without breakpoints, we'd need to explicitly read the memory ourself -- which is not necessary without non-stop mode. At the same time, I don't yet know any scenario when always-inserted-breakpoints mode should not be used in non-stop mode -- as non-stop mode needs some support from remote side anyway, we might as well demand "right" behaviour from Z0/m. - Volodya