static void
rbreak_command (char *regexp, int from_tty)
{
- struct cleanup *old_chain;
char *string = NULL;
int len = 0;
const char **files = NULL;
@@ -4550,8 +4541,7 @@ rbreak_command (char *regexp, int from_tty)
FUNCTIONS_DOMAIN,
nfiles, files);
- start_rbreak_breakpoints ();
- old_chain = make_cleanup (do_end_rbreak_breakpoints, NULL);
+ scoped_rbreak_breakpoints finalize;
for (const symbol_search &p : symbols)
{
if (p.msymbol.minsym == NULL)
@@ -4596,8 +4586,6 @@ rbreak_command (char *regexp, int from_tty)
MSYMBOL_PRINT_NAME (p.msymbol.minsym));
}
}
-
- do_cleanups (old_chain);
}