[lldb-dev] Scripting on frame finish?
Christian Convey via lldb-dev
lldb-dev at lists.llvm.org
Fri Aug 5 12:15:39 PDT 2016
Any suggestions on the following?
I've got some scripts written for gdb's Python API, and I'm trying to
port them to LLDB. Those script include some code that ideally
executes during, or shortly after, each completed call to a particular
function. I.e., the user says he/she is interested in function "foo",
and I want to have some of my script code run every time a stack frame
for "foo" is pushed or popped from a call stack.
Ideally the LLDB version will retain all of the following functionality:
* The ability to correlate individual calls of the function
with individual completions, particularly when recursion is
* Having completions be reported not only when the function
in question returns normally, but also when it completes
because a longjmp or C++ exception blew past it.
In gdb's Python API, I've been using the "gdb.FinishBreakpoint" class
for this. But I haven't found an equivalent mechanism in LLDB.
The closest thing I've spotted is LLDB's "step out" command, but I'm
not clear regarding if/how that could make my life difficult in other
ways, particularly in the presence of recursion.
More information about the lldb-dev