@@ -13,6 +13,7 @@ def setUp(self):
13
13
# Find the line numbers to break inside main().
14
14
self .main_source = "main.cpp"
15
15
self .break_line = line_number (self .main_source , "// Set breakpoint here." )
16
+ self .bar_break_line = line_number (self .main_source , "return id + Class" )
16
17
17
18
@add_test_categories (["pyapi" ])
18
19
def test_with_python_api (self ):
@@ -26,6 +27,11 @@ def test_with_python_api(self):
26
27
bpt = target .BreakpointCreateByLocation (self .main_source , self .break_line )
27
28
self .assertTrue (bpt , VALID_BREAKPOINT )
28
29
30
+ bar_bpt = target .BreakpointCreateByLocation (
31
+ self .main_source , self .bar_break_line
32
+ )
33
+ self .assertTrue (bar_bpt , VALID_BREAKPOINT )
34
+
29
35
# Now launch the process, and do not stop at entry point.
30
36
process = target .LaunchSimple (None , None , self .get_process_working_directory ())
31
37
@@ -52,3 +58,10 @@ def test_with_python_api(self):
52
58
patterns = ["\(id\) \$.* = nil" ],
53
59
)
54
60
self .expect ("expr --language C++ -- id my_id = 0; my_id" , error = True )
61
+
62
+ lldbutil .continue_to_breakpoint (process , bar_bpt )
63
+
64
+ self .expect_expr ("id" , result_value = "12" , result_type = "int" )
65
+ self .expect_expr ("Class" , result_value = "15" , result_type = "int" )
66
+ self .expect ("expr --language Objective-C++ -- id" , error = True )
67
+ self .expect ("expr --language Objective-C++ -- Class" , error = True )
0 commit comments