[lldb-dev] Pending breakpoints strategy?

Eran Ifrah eran.ifrah at gmail.com
Tue Apr 22 10:54:49 PDT 2014


While experimenting with my new lldb plugin, I placed a breakpoint inside a
shared object (using file:line / name ) which is loaded via 'dlopen'

My stratey so far for breakpoints was:

- Create debugger
- Create the target
- Launch target with the flag 'lldb::eLaunchFlagStopAtEntry'
- When stopped on first entry, all breakpoints are being applied using
m_target.BreakpointCreateByName / BreakpointCreateByLocation
- The plugin then queries lldb to get a complete list of breakpoints
andupdate the UI (some breakpoint are resolved to multiple locations, moved
if they were placed on a comment etc) like this:

int num = m_target.GetNumBreakpoints();
for(int i=0; i<num; ++i) {
        lldb::SBBreakpoint bp = m_target.GetBreakpointAtIndex(i);

At this point, I can see that the breakpoints I have applied in the shared
libraries were not applied. So my question is:
Who should be responsible for the "pending" breakpoints? Is it done
automatically by lldb? or should I keep a list of un-applied breakpoints
and try to re-apply them later on?

If the later is the case, can the plugin be notified when a shared library
is loaded? (this seems like a good candidate for trying to re-apply pending


Eran Ifrah
Author of codelite, a cross platform open source C/C++ IDE:
wxCrafter, a wxWidgets RAD: http://wxcrafter.codelite.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140422/37a42b4f/attachment.html>

More information about the lldb-dev mailing list