From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9398 invoked by alias); 15 Apr 2010 18:59:43 -0000 Received: (qmail 9381 invoked by uid 22791); 15 Apr 2010 18:59:40 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Apr 2010 18:59:34 +0000 Received: (qmail 2476 invoked from network); 15 Apr 2010 18:59:31 -0000 Received: from unknown (HELO macbook-2.local) (stan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Apr 2010 18:59:31 -0000 Message-ID: <4BC76205.1040303@codesourcery.com> Date: Thu, 15 Apr 2010 18:59:00 -0000 From: Stan Shebs User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Pedro Alves CC: Michael Snyder , "gdb-patches@sourceware.org" , "tromey@redhat.com" Subject: Re: PR8554: New command to save breakpoints to a file References: <201004090341.14389.pedro@codesourcery.com> <201004121914.44401.pedro@codesourcery.com> <4BC7523B.6010708@vmware.com> <201004151927.05612.pedro@codesourcery.com> In-Reply-To: <201004151927.05612.pedro@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00477.txt.bz2 Pedro Alves wrote: > On Thursday 15 April 2010 18:51:55, Michael Snyder wrote: > >> What about watchpoints? Do we get all the context info right? >> > > Watchpoints on globals, as right as breakpoints. Watchpoints on > locals, no, you're just out of luck. I don't think there's > much to do there; GDB gets rid of those on process start/exit, > so users are used to those not being very "persistanteable". > OTOH, it may be useful to be able to dump watchpoints on locals, > and be able to load them up when you know it's okay, so never > dumping those isn't that great either. So, IMO, we shouldn't > worry much about those, at least, in this first patch. :-) I > could add a note to the manual, perhaps. > > I can't remember if we've discussed this idea before, but a simple way to handle in the future might be simply to introduce a syntax for referring to specific locals - function:::local, file:line:::local, for instance. You get a sal that maps to a block, then can find the block's symbol with that name. If the name also occurs in superblocks, you could make a policy decision as to whether to include the first found, or all found. Stan