Fix regression for multi breakpoints command line clearing.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 2 Aug 2018 21:13:22 +0000 (23:13 +0200)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 28 Aug 2018 21:11:42 +0000 (23:11 +0200)
commit5dc5ecd1fde2c3eba2f0c870ad12c4cb120224d0
tree08e47e9aee0215f8d16d90550e1b68abbce4505b
parentfec2cf3421a5195353499d95d340ee002fa5ef9e
Fix regression for multi breakpoints command line clearing.

breakpoint.c is modified to fix the regression introduced
when clearing the commands of several breakpoints by giving an empty
list of commands, by just typing "end".
GDB should read an empty list of command once, but it reads
it for each breakpoint, as an empty list of command is NULL,
and NULL is interpreted as 'not having read the command list yet'.

The fix consists in having a boolean set to true once the
command list has been read.

gdb/ChangeLog

2018-08-26  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* breakpoint.c (commands_command_1): New boolean cmd_read
to detect cmd was already read.
gdb/breakpoint.c