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

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@lists.llvm.org
Reporter berykubik@gmail.com
CC llvm-bugs@lists.llvm.org
Classification Unclassified

Created attachment 15035 [details]
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

Jim Ingham changed bug 25111

What | Removed | Added |

  • | - | - |
    Status | NEW | RESOLVED |
    CC | | jingham@apple.com |
    Resolution | — | INVALID |

Comment # 1 on bug 25111 from Jim Ingham