[lldb-dev] api questions

Jim Ingham jingham at apple.com
Tue Sep 25 10:44:56 PDT 2012

On Sep 25, 2012, at 6:43 AM, Carlo Kok <ck at remobjects.com> wrote:

> I've figured out most of what i need from the LLDB api but have a few questions I can't figure out myself:
> * How do i get notified of "thread started", "thread finished" events?

We don't currently support thread started & thread finished.  

> * How do i find out when a breakpoint has been bound?

The target broadcasts "breakpoint changed" notifications.  Note that lldb breakpoints remain active as long as they are around and can be set on many locations, so they may be "bound" more than once in the course of the debugging session.  Anyway, you get the target broadcaster, and attach a listener to that (listening for the event bit eBroadcastBitBreakpointChanged) and wait on the listener.  There are some static functions in SBBreakpoint.h to decode the breakpoint changed events.  

> * How can I get notified of when a module is loaded?

The target also broadcasts these, the event bits are eBroadcastBitModulesLoaded & Unloaded.  These events don't contain any data, you have to look at the module list to figure out what happened.  We should add the list of modules changed at some point.

> * How do I stop a process when it's still running, "Stop" sets a breakpoint, which isn't what i want. Disposing the debugger creates access violations.

Humm, Stop is the call to use, but it shouldn't need to set a breakpoint.  How are you seeing that?

> (That all said, it besides these few minor issues, it does work quite well)

That's great to hear!


> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

More information about the lldb-dev mailing list