[RFA 1/2] Remove some cleanups from breakpoint.c

Tom Tromey tom@tromey.com
Wed Oct 11 21:44:00 GMT 2017


>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

>> +  markers = target_static_tracepoint_markers_by_strid
>> (marker_str.c_str ());

Simon> It's not related to your patch, but is it possible that the markers
Simon> VEC never gets freed?

Yes.  In fact I think all callers of
target_static_tracepoint_markers_by_strid leak memory.

Simon> You don't actually need to capture anything in these two lambdas.

Simon> IIUC, using "breakpoint_p" was only needed because of the VEC.  Now
Simon> that we use std::vector, it would be nice if you changed breakpoint_p
Simon> to breakpoint * in the code you touched.

Simon> With those changed, the patch LGTM.

Thanks, I'll make those changes & push.

Tom



More information about the Gdb-patches mailing list