From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12948 invoked by alias); 15 Apr 2010 23:25:22 -0000 Received: (qmail 12939 invoked by uid 22791); 15 Apr 2010 23:25:22 -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 23:25:17 +0000 Received: (qmail 7841 invoked from network); 15 Apr 2010 23:25:15 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Apr 2010 23:25:15 -0000 From: Pedro Alves To: Michael Snyder Subject: Re: PR8554: New command to save breakpoints to a file Date: Thu, 15 Apr 2010 23:25:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) Cc: "gdb-patches@sourceware.org" , "tromey@redhat.com" References: <201004090341.14389.pedro@codesourcery.com> <201004160004.58431.pedro@codesourcery.com> <4BC79E1E.2060005@vmware.com> In-Reply-To: <4BC79E1E.2060005@vmware.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004160025.13611.pedro@codesourcery.com> 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/msg00493.txt.bz2 On Friday 16 April 2010 00:15:42, Michael Snyder wrote: > No, the current implementation calls "warning", with the same > message. So it comes out at the console as: > > Warning: Nothing to save. > I meant, "warning" is what the current code already does: - if (!any_tp) + + if (!any) { - warning (_("save-tracepoints: no tracepoints to save.")); + warning (_("Nothing to save.")); return; } > Just sounds a little draconian, that's all. ;-) It's actually correct to be a warning. If 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. But 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