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 20:40:59 +0000 (22:40 +0200)
commit999700cd99a227bd6848e95cdc99117b2185e84c
treeafd748493f4e381cef66407523550d782bfa458a
parent5fe3f3e4633df1ea76ff24a2732d7c73dc983b90
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