2 Test calling a function, stopping in the call, continue and gather the result on stop.
6 from lldbsuite
.test
.lldbtest
import *
7 from lldbsuite
.test
import lldbutil
10 class ExprCommandCallStopContinueTestCase(TestBase
):
12 # Call super's setUp().
14 # Find the line number to break for main.c.
17 """Test gathering result from interrupted function call."""
19 lldbutil
.run_to_source_breakpoint(
20 self
, "// break here", lldb
.SBFileSpec("main.cpp")
23 lldbutil
.run_break_set_by_file_and_line(
26 line_number("main.cpp", '{5, "five"}'),
27 num_expected_locations
=-1,
32 "expr -i false -- returnsFive()",
34 substrs
=["Execution was interrupted, reason: breakpoint"],
37 self
.runCmd("continue", "Continue completed")
41 "stop reason = User Expression thread plan",
42 r
'Completed expression: (Five) $0 = (number = 5, name = "five")',