<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - SBThread::ReturnFromFrame does not work"
   href="https://llvm.org/bugs/show_bug.cgi?id=25070">25070</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SBThread::ReturnFromFrame does not work
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>berykubik@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15010" name="attach_15010" title="C++ source with test program">attachment 15010</a> <a href="attachment.cgi?id=15010&action=edit" title="C++ source with test program">[details]</a></span>
C++ source with test program

I'm using lldb 3.8 compiled from trunk, but I also experienced this issue in
lldb-3.6.

When I use SBThread::ReturnFromFrame when in a C++ function that returns some
value, the SBValue doesn't get set, even though no error is returned. Is this
function currently implemented?
<a href="https://github.com/llvm-mirror/lldb/blob/f2d745d54e1903f72190f767633af481f61ff0c2/source/Target/Thread.cpp#L1921">https://github.com/llvm-mirror/lldb/blob/f2d745d54e1903f72190f767633af481f61ff0c2/source/Target/Thread.cpp#L1921</a>
seems to imply that it's not.

Example script (I attached the C++ source test.cpp):

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(1) # wait for bp to be hit

thread = process.GetSelectedThread()
frame = thread.GetSelectedFrame()
value = lldb.SBValue()
error = thread.ReturnFromFrame(frame, value)
# error is marked as sucesss, but value contains nothing</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>