Hi,

Is there a way to mimic gdb's "return <expr>" command?

(gdb) help return
Make selected stack frame return to its caller.
Control remains in the debugger, but when you continue
execution will resume in the frame above the one now selected.
If an argument is given, it is an expression for the value to return.


I've been looking at the StackFrame class, but it doesn't look like it can
do that.
If I wanted to implement it, where should I look first? I can get the return
address (StackFrame.GetRegisterContext().get().GetReturnAddress(), I think)
write it to the PC (StackFrame.ChangePC()), but I have no idea how to get
the expression's result into the return registers/memory. ClangExpression
isn't a big help there, since the result comes to debugger-land.

Regards,

  Filipe
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to