Re: [RFA 61/67] Constify some commands in breakpoint.c

Patrick Monnerat
2017-09-21T13:20:13Z

On 09/21/2017 10:56 AM, Pedro Alves wrote:
> On 09/21/2017 06:10 AM, Tom Tromey wrote:
>> This also makes delete_command static; but now I wonder if it is used
>> in Insight and should not be touched.
> ..
> gdbtk/generic/gdbtk-cmds.c: delete_command (NULL, 0);
>
> I guess it'd be mildly nicer to add some "void delete_all_breakpoints();"
> API instead of abusing the command callback.
>
I've just added such an API to the insight code:
https://sourceware.org/git/?p=insight.git;a=commit;h=7dc503fbf209ec7f39771c2bf5e45e01974f18c5
It works fine without calling delete_command(). Thus it's OK for me to
have static delete_command().

@palves: many thanks for having raised the flag before commit.

Patrick