This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR8554: New command to save breakpoints to a file


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 <pedro@codesourcery.com> wrote:
> 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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]