Replace start_rbreak_breakpoints and end_rbreak_breakpoints
authorTom Tromey <tom@tromey.com>
Wed, 1 Nov 2017 15:00:09 +0000 (09:00 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 4 Nov 2017 16:27:17 +0000 (10:27 -0600)
commitc80049d3b615691dc902762d5d97551aa9664442
treea538ad25dabca7d727f48d80d3b205792f5f6624
parent167b0be1b5ef36a5605fcdfba0c84db2ed475e1e
Replace start_rbreak_breakpoints and end_rbreak_breakpoints

This replaces start_rbreak_breakpoints and end_rbreak_breakpoints with
a new scoped class.  This allows the removal of a cleanup.

This also fixes an earlier memory leak regression, by changing
"string" to be a std::string.

gdb/ChangeLog
2017-11-04  Tom Tromey  <tom@tromey.com>

* breakpoint.c
(scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
from start_rbreak_breakpoints.
(scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
* breakpoint.h (class scoped_rbreak_breakpoints): New.
(start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
* symtab.c (do_end_rbreak_breakpoints): Remove.
(rbreak_command): Use scoped_rbreak_breakpoints, std::string.
gdb/ChangeLog
gdb/breakpoint.c
gdb/breakpoint.h
gdb/symtab.c