This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]