https://llvm.org/bugs/show_bug.cgi?id=25111

Jim Ingham <jing...@apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jing...@apple.com
         Resolution|---                         |INVALID

--- Comment #1 from Jim Ingham <jing...@apple.com> ---
I don't think this has to do with StepOut & the thread return value.  It is
because you are driving lldb in async mode but not fetching any events.  You
either need to wait on the debugger event source, or run in sync mode.  An
example of waiting on events is given in examples/python/process-events.py in
the lldb sources.  Running in sync mode looks like:

 > cat doit.py
import lldb
import os
import time

debugger = lldb.SBDebugger.Create()
# Run the debugger in Sync mode:
debugger.SetAsync(False)
target = debugger.CreateTarget("/tmp/foo")
target.BreakpointCreateByLocation("foo.cpp", 3)
process = target.LaunchSimple([], [], os.getcwd())

thread = process.GetSelectedThread()
thread.StepOut()

value = thread.GetStopReturnValue()
print value

debugger.Terminate()
 > ( setenv PYTHONPATH `lldb -P` ; python doit.py )
(int) $0 = 8

That worked.  You should never have to insert sleeps to get lldb to do what you
want, if you are doing that then either we have bug or you aren't running lldb
in the mode you think you are.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to