[lldb-dev] [Bug 25070] SBThread::ReturnFromFrame does not work
https://llvm.org/bugs/show_bug.cgi?id=25070 Jakub Beránekchanged: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID |--- --- Comment #3 from Jakub Beránek --- I tried to use StepOut, but it also doesn't seem to work. 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() thread.StepOut() value = thread.GetStopReturnValue() # No value When I print the thread (print(thread)), it shows the stop reason and value: "stop reason = step out\nReturn value: (int) $0 = 11", but I can't get the value from the thread directly (both return_value and GetStopReturnValue() return No value). And after the step out, the frames from the thread disappear (before step out, the thread had 6 stack frames, after step out, all of them disappeared). -- 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
[lldb-dev] [Bug 25081] New: SBThread::is_stopped shows incorrect value
https://llvm.org/bugs/show_bug.cgi?id=25081 Bug ID: 25081 Summary: SBThread::is_stopped shows incorrect 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: beryku...@gmail.com CC: llvm-b...@lists.llvm.org Classification: Unclassified Created attachment 15016 --> https://llvm.org/bugs/attachment.cgi?id=15016=edit C++ source code that loops endlessly I'm using lldb 3.8 built from trunk. When I stop the process, it stops all the threads, but their attribute is_stopped is not set properly. I've attached a simple C++ source code that loops endlessly. import lldb import os import time debugger = lldb.SBDebugger.Create() target = debugger.CreateTarget("./test") process = target.LaunchSimple([], [], os.getcwd()) time.sleep(1) process.Stop() time.sleep(1) for t in process: assert t.is_stopped -- 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
[lldb-dev] [Bug 25070] New: SBThread::ReturnFromFrame does not work
https://llvm.org/bugs/show_bug.cgi?id=25070 Bug ID: 25070 Summary: SBThread::ReturnFromFrame does not work Product: lldb Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: beryku...@gmail.com CC: llvm-b...@lists.llvm.org Classification: Unclassified Created attachment 15010 --> https://llvm.org/bugs/attachment.cgi?id=15010=edit 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? https://github.com/llvm-mirror/lldb/blob/f2d745d54e1903f72190f767633af481f61ff0c2/source/Target/Thread.cpp#L1921 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 -- 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