[lldb-dev] [Bug 25070] SBThread::ReturnFromFrame does not work

via lldb-dev lldb-dev at lists.llvm.org
Tue Oct 6 15:19:42 PDT 2015


Jakub Beránek <berykubik at gmail.com> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #3 from Jakub Beránek <berykubik at gmail.com> ---
I tried to use StepOut, but it also doesn't seem to work.

import lldb
import os
import time

debugger = lldb.SBDebugger.Create()
target = debugger.CreateTarget("./test")
target.BreakpointCreateByLocation("test.cpp", 3)
process = target.LaunchSimple([], [], os.getcwd())

time.sleep(2) # wait for bp to be hit

thread = process.GetSelectedThread()
value = thread.GetStopReturnValue() # No value

When I print the thread (print(thread)), it shows the stop reason and value:
"stop reason = step out\nReturn value: (int) $0 = 11", but I can't get the
value from the thread directly (both return_value and GetStopReturnValue()
return No value). And after the step out, the frames from the thread disappear
(before step out, the thread had 6 stack frames, after step out, all of them

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151006/a788165d/attachment.html>

More information about the lldb-dev mailing list