[lldb-dev] python SBBreakpoint questions
sideshowtwig at gmail.com
Fri Oct 19 11:26:33 PDT 2012
I'm having trouble using breakpoints with the python API... My script creates a bunch of breakpoints (by address), launches the target and then goes into an infinite loop checking 'process.GetState()'. The scripts checks for a state of 'eStateStopped', and then iterates through the threads until it finds a thread stop reason of 'eStopReasonBreakpoint'. The issue with that approach is that I can't figure out which breakpoint triggered the thread to stop. So I guess I have two questions, (1) how do I use SetCallback() to call a method when a breakpoint is triggered and (2) if I know which thread hit my breakpoint, how do I know which SBBreakpoint triggered?
BTW, I looked through all of the unit test for examples of how to do this but all I could find was a call to SetCallback(None, None). The documentation for SBBreakpoint gives a prototype of SetCallback(BreakpointHitCallback callback, void baton) but BreakpointHitCallback doesn't appear to be documented in the python docs.
Any help would be greatly appreciated. :-)
More information about the lldb-dev