[lldb-dev] [Bug 25111] New: SBThread::StepOut erases stack frames and doesn't set return value

via lldb-dev lldb-dev at lists.llvm.org
Thu Oct 8 10:42:00 PDT 2015


            Bug ID: 25111
           Summary: SBThread::StepOut erases stack frames and doesn't set
                    return value
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: berykubik at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15035
  --> https://llvm.org/bugs/attachment.cgi?id=15035&action=edit
C++ source with a simple function that returns a value

SBThread::StepOut doesn't seem to work for me on lldb 3.8 compiled from trunk.
When I use it, the thread loses it's stack frames (len(thread.frames) == 0) and
the return_value attribute doesn't get set. What is curious though, that when I
print the thread, it's description contains both the stack frame and the return
value (in text form). I've attached a simple C++ program that demonstrates
this. I've compiled it with -g, -O0 and even -fno-inline-small-functions, so
the function should not be inlined.

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()

time.sleep(2) # wait for step out to complete

value = thread.GetStopReturnValue() # No value

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/20151008/51fc1662/attachment.html>

More information about the lldb-dev mailing list