7
7
8
8
9
9
class LocationListLookupTestCase (TestBase ):
10
- def launch (self ) -> lldb .SBProcess :
10
+ @skipIf (oslist = ["linux" ], archs = ["arm" ])
11
+ def test_loclist (self ):
12
+ self .build ()
13
+
11
14
exe = self .getBuildArtifact ("a.out" )
12
15
target = self .dbg .CreateTarget (exe )
13
16
self .assertTrue (target , VALID_TARGET )
@@ -19,31 +22,15 @@ def launch(self) -> lldb.SBProcess:
19
22
self .assertTrue (process .IsValid ())
20
23
self .assertTrue (process .is_stopped )
21
24
22
- return process
23
-
24
- def check_local_vars (self , process : lldb .SBProcess , check_expr : bool ):
25
25
# Find `bar` on the stack, then
26
26
# make sure we can read out the local
27
27
# variables (with both `frame var` and `expr`)
28
28
for f in process .GetSelectedThread ().frames :
29
- frame_name = f .GetDisplayFunctionName ()
30
- if frame_name is not None and frame_name .startswith ("Foo::bar" ):
29
+ if f .GetDisplayFunctionName ().startswith ("Foo::bar" ):
31
30
argv = f .GetValueForVariablePath ("argv" ).GetChildAtIndex (0 )
32
31
strm = lldb .SBStream ()
33
32
argv .GetDescription (strm )
34
33
self .assertNotEqual (strm .GetData ().find ("a.out" ), - 1 )
35
34
36
- if check_expr :
37
- process .GetSelectedThread ().SetSelectedFrame (f .idx )
38
- self .expect_expr ("this" , result_type = "Foo *" )
39
-
40
- @skipIf (oslist = ["linux" ], archs = ["arm" ])
41
- @skipIfDarwin
42
- def test_loclist_frame_var (self ):
43
- self .build ()
44
- self .check_local_vars (self .launch (), check_expr = False )
45
-
46
- @skipUnlessDarwin
47
- def test_loclist_expr (self ):
48
- self .build ()
49
- self .check_local_vars (self .launch (), check_expr = True )
35
+ process .GetSelectedThread ().SetSelectedFrame (f .idx )
36
+ self .expect_expr ("this" , result_type = "Foo *" )
0 commit comments