[lldb-dev] PATCH for Review: Fix Rendezvous breakpoint to only be set once, resolve addr in BreakpointLocationList::FindByAddress

Greg Clayton gclayton at apple.com
Tue Jul 16 13:10:48 PDT 2013


On Jul 15, 2013, at 5:24 PM, Michael Sartain <mikesart at gmail.com> wrote:

> On Mon, Jul 15, 2013 at 4:15 PM, Greg Clayton <gclayton at apple.com> wrote:
> You might think about storing the breakpoint ID instead of a shared pointer to the breakpoint.
> 
> 
> Can I ask why? There should only be one of these I believe.

It really shouldn't matter really. Just to make sure no strong reference to a breakpoint stays around longer than required.

> I think ThreadPlanStepRange.cpp does something similar with m_next_branch_bp_sp. Does that make sense to switch to IDs as well?

I can see the thread plans doing this because they will be accessing the breakpoint as soon as you stop. For the dynamic loaders, we tend to create the breakpoint and then the callback will be called automatically, so we aren't digging up the breakpoint each time we hit it.

This doesn't need to be done, this is just out the MacOSX dynamic loader does it.

Greg




More information about the lldb-dev mailing list