From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3130 invoked by alias); 5 May 2010 08:28:26 -0000 Received: (qmail 3116 invoked by uid 22791); 5 May 2010 08:28:25 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45 X-Spam-Check-By: sourceware.org Received: from mail-pw0-f41.google.com (HELO mail-pw0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 May 2010 08:28:15 +0000 Received: by pwi10 with SMTP id 10so2587296pwi.0 for ; Wed, 05 May 2010 01:28:14 -0700 (PDT) Received: by 10.142.67.30 with SMTP id p30mr3682281wfa.154.1273048094160; Wed, 05 May 2010 01:28:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.4.9 with HTTP; Wed, 5 May 2010 01:27:54 -0700 (PDT) In-Reply-To: <201004160025.13611.pedro@codesourcery.com> References: <201004090341.14389.pedro@codesourcery.com> <201004160004.58431.pedro@codesourcery.com> <4BC79E1E.2060005@vmware.com> <201004160025.13611.pedro@codesourcery.com> From: Hui Zhu Date: Wed, 05 May 2010 08:28:00 -0000 Message-ID: Subject: Re: PR8554: New command to save breakpoints to a file To: Pedro Alves Cc: Michael Snyder , "gdb-patches@sourceware.org" , "tromey@redhat.com" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-05/txt/msg00088.txt.bz2 Hi, I think this idea is very cool. Now, more and more function have a special switch to set a lot of things. So setup them to fit every time will very hard thing. I suggest we design a new frame "save". That every feature can add item to it. The customer just use "save" or "save break" to set all of the items or just break items. Thanks, Hui On Fri, Apr 16, 2010 at 07:25, Pedro Alves wrote: > On Friday 16 April 2010 00:15:42, Michael Snyder wrote: >> No, the current implementation calls "warning", with the same >> message. =A0So it comes out at the console as: >> >> =A0 =A0Warning: Nothing to save. >> > > I meant, "warning" is what the current code already does: > > - =A0if (!any_tp) > + > + =A0if (!any) > =A0 =A0 { > - =A0 =A0 =A0warning (_("save-tracepoints: no tracepoints to save.")); > + =A0 =A0 =A0warning (_("Nothing to save.")); > =A0 =A0 =A0 return; > =A0 =A0 } > >> Just sounds a little draconian, that's all. =A0 ;-) > > It's actually correct to be a warning. =A0If there's nothing > to save, the command does not overwrite a previous file, > so a follow up "source" may read a stale breakpoint|tracepoint > list. > > When writing the patch I had considered that this could > be seen as a bug, and, hence we should either `error' out, > or, proceed and write an empty file. =A0But as I said, I didn't > want to change the whole world with a single patch, so I > left that part out of the discussion on purpose... > > -- > Pedro Alves >