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

Simon Marchi
2017-11-03T17:20:12Z

On 2017-11-03 12:58, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
>
> Simon> Your patch LGTM. But how is the "string" string freed in
> Simon> rbreak_command?
>
> It is leaked, which apparently is a regression introduced by an earlier
> patch of mine. Sorry about that! I've updated the patch as appended
> to
> fix this problem.
>
> Tom
>
> commit 391e4d7aa45fc4947632aa06a7aa462eeef3377c
> Author: Tom Tromey <tom@tromey.com>
> Date: Wed Nov 1 09:00:09 2017 -0600
>
> 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.

LGTM, though I would suggest using string_print, I think it would be
more readable.

Simon