[RFA 01/14] Introduce event_location_up

Tom Tromey tom@tromey.com
Mon Apr 10 23:19:00 GMT 2017


>> -      b->location = new_explicit_location (&explicit_loc);
>> +      b->location = new_explicit_location (&explicit_loc).release ();

Simon> Since the breakpoint structure is new'ed and delete'd, you can also
Simon> change breakpoint's location field to be an event_location_up, instead
Simon> of doing a (bunch of) release.  I think you could do the same with the
Simon> location field in linespec_result as well, since that structure is
Simon> only allocated statically (and therefore its defaults ctor/dtor are
Simon> called).

Rather than change this patch, I've added new patches to do these
things.  Once I started changing linespec_result, I realized it should
be converted more fully.

Tom



More information about the Gdb-patches mailing list