Re: [RFA 06/13] Replace start_rbreak_breakpoints and end_rbreak_breakpoints

Simon Marchi
2017-11-03T01:21:04Z

On 2017-11-02 18:36, Tom Tromey wrote:
> 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);
> }
> \f

Your patch LGTM. But how is the "string" string freed in
rbreak_command?

Simon