This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PR8554: New command to save breakpoints to a file
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