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

Patrick Monnerat patrick@monnerat.net
Thu Sep 21 13:20:00 GMT 2017


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



More information about the Gdb-patches mailing list