From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8192 invoked by alias); 15 Apr 2010 23:14:18 -0000 Received: (qmail 8182 invoked by uid 22791); 15 Apr 2010 23:14:18 -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 smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Apr 2010 23:14:13 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 4BEB42300C; Thu, 15 Apr 2010 16:14:12 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id 41BEFCD926; Thu, 15 Apr 2010 16:14:12 -0700 (PDT) Message-ID: <4BC79DC3.7070308@vmware.com> Date: Thu, 15 Apr 2010 23:14:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Pedro Alves CC: "gdb-patches@sourceware.org" , "tromey@redhat.com" Subject: Re: PR8554: New command to save breakpoints to a file References: <201004090341.14389.pedro@codesourcery.com> <201004151953.05613.pedro@codesourcery.com> <4BC761E4.2040505@vmware.com> <201004152058.06658.pedro@codesourcery.com> <4BC797FC.7040602@vmware.com> <4BC79899.10801@vmware.com> <4BC79A0F.9090406@vmware.com> In-Reply-To: <4BC79A0F.9090406@vmware.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00490.txt.bz2 Michael Snyder wrote: > Michael Snyder wrote: >> Michael Snyder wrote: >>> Pedro Alves wrote: >>>> On Thursday 15 April 2010 19:58:44, Michael Snyder wrote: >>>>>>>> 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. >>>>>>> That's cool. So what do we do now? Just skip them? >>>>>>> Save the global ones, skip the local ones? >>>>>> We save them. >>>>>> >>>>> Oh -- and on reload, some of them fail? >>>>> >>>>> Shouldn't be difficult to skip saving all of them, but what about >>>>> skipping the locals and saving the globals? Hard? >>>> As I said above, 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. It's not hard, >>>> it's just not always the right thing. As is, the user can edit the >>>> script if the wants to zap some breakpoints before sourcing it. It's >>>> just a CLI script. If you want to add a new command switch to >>>> tune the behaviour, that'd be cool. >>>> >>> Fair enough. >>> >>> BTW. "save_command" needs to print an error or something, not >>> simply return without doing anything. If I type "save", >>> I get a silent failure. >>> >>> >> ... or perhaps "save" should be aliased to "save-tracepoints", >> to mimic the previous behavior. > > Also maybe this should be milder than a warning: > > if (!any) > { > if (from_tty) > printf_filtered (_("Nothing to save.")); > return; > } > Also, it doesn't seem right to me that "save tracepoints" will ignore breakpoints, but "save breakpoints" doesn't ignore tracepoints (but rather saves them both). Since you have this filter mechanism in place already, why don't you arrange to have "save breakpoints" save only breakpoints?