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
_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to