[Lldb-commits] [PATCH] D30249: Clear expression when breakpoint location becomes unresolved

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 22 14:32:11 PST 2017


In some classes we have a Clear method that we use to release resources from an object when we are done with it but it might not get destroyed right away.  I pretty sure Greg thought that you would be adding your change to such a method; and in fact it would be fine to add a Clear method to BreakpointLocation and put the deallocation of the user expression there, but there isn't one at present.  Greg's not as familiar with the breakpoints as with other parts of lldb, since I wrote that subsystem and have been mostly maintaining it over the years, so he probably didn't know this.

Sorry for the crossed wires.

Jim



> On Feb 22, 2017, at 12:39 PM, Pavel Labath via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> labath added a comment.
> 
>> Note that the breakpoint location's site gets cleared when you disable the breakpoint or its location, as well as when you delete it.  So if you have a workflow that does: "hit a breakpoint, disable it, hit another, reenable the first, hit the second" you'll end up re-evaluating the condition expression unnecessarily.  This isn't a terribly common workflow, and compiling the expression is not hugely expensive.  But in this instance, it was probably better to break the link at the SBBreakpoint level, and not here.
> 
> Sorry, I thought I understood Greg wanted me to do this. I can certainly do the SBBreakpoint thing instead.
> 
> 
> https://reviews.llvm.org/D30249
> 
> 
> 



More information about the lldb-commits mailing list