<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jingham@apple.com" title="Jim Ingham <jingham@apple.com>"> <span class="fn">Jim Ingham</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - SBThread::StepOut erases stack frames and doesn't set return value"
   href="https://llvm.org/bugs/show_bug.cgi?id=25111">bug 25111</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>jingham@apple.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - SBThread::StepOut erases stack frames and doesn't set return value"
   href="https://llvm.org/bugs/show_bug.cgi?id=25111#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - SBThread::StepOut erases stack frames and doesn't set return value"
   href="https://llvm.org/bugs/show_bug.cgi?id=25111">bug 25111</a>
              from <span class="vcard"><a class="email" href="mailto:jingham@apple.com" title="Jim Ingham <jingham@apple.com>"> <span class="fn">Jim Ingham</span></a>
</span></b>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>