[lldb-dev] Function tracing
Bruce Mitchener
bruce.mitchener at gmail.com
Sun Feb 22 19:42:22 PST 2015
I'd like to have a command (Python script?) that allows me to trace
function calls and exits.
One possible implementation seems that I could:
- Set up a breakpoint on function entry.
- Run some code to log the arguments passed to the function.
- Use SBThread::StepOut() to get to where the function has been exited.
This leaves me with a number of questions though:
- Is this a good or even valid approach?
- 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)?
- How do I get the return value for the function that I've just exited
via StepOut?
- What happens if X has been inlined? Will this work still for all
entries and exits?
- I also saw SBThreadPlan was added since I last looked into this. Does
anything use this? (I didn't see any uses in-tree.)
Thanks!
- Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150223/fbdbdeec/attachment.html>
More information about the lldb-dev
mailing list