[lldb-dev] Function tracing

Bruce Mitchener bruce.mitchener at gmail.com
Mon Feb 23 11:33:46 PST 2015


Jim,

Thanks for all of this great info!

Just two more questions for now ...

On Tue, Feb 24, 2015 at 2:08 AM, <jingham at apple.com> wrote:

>
> > On Feb 22, 2015, at 7:42 PM, Bruce Mitchener <bruce.mitchener at gmail.com>
> wrote:
> >       • Is all of this safe against re-entry? What happens if I'm trying
> X and X gets invoked again (during the thread plan execution)?
>
> The most straightforward way to do this would be to write something that
> just drives the event loop a la:
>
>
> http://llvm.org/svn/llvm-project/lldb/trunk/examples/python/process_events.py
>
> Then recursion won't bother you.  The step plans stack, so if you do your
> "step-out" and before the step out completes you hit the breakpoint again,
> that's okay, the first step-out plan is still on the plan stack.  Do your
> "step-out" for the second breakpoint hit, and when that completes,
> "continue" and the original step-out plan will then get a chance to
> complete.  And since plans are per thread, doing this on multiple threads
> won't cause any problems either.
>

Ahh, I was going to do this from a command inside the LLDB CLI for now...
Will that work well?

Also, will this prevent other threads from running while I have a function
trace happening? (The comments in the code about this aren't clear to me.)

 - Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150224/3b6dd45a/attachment.html>


More information about the lldb-dev mailing list