@@ -51,21 +51,56 @@ def test_dwarf_importer(self):
51
51
lldbutil .check_variable (self ,
52
52
target .FindFirstGlobalVariable ("point" ),
53
53
typename = '__ObjC.Point' , num_children = 2 )
54
- self .expect ("ta v point" , substrs = ["x = 1" , "y = 2" ])
55
- self .expect ("ta v enumerator" , substrs = [".yellow" ])
56
- self .expect ("ta v pureSwiftStruct" , substrs = ["pure swift" ])
57
- self .expect ("ta v swiftStructCMember" ,
54
+ self .expect ("target variable point" , substrs = ["x = 1" , "y = 2" ])
55
+ self .expect ("target variable enumerator" , substrs = [".yellow" ])
56
+ self .expect ("target variable pureSwiftStruct" , substrs = ["pure swift" ])
57
+ self .expect ("target variable swiftStructCMember" ,
58
58
substrs = ["point" , "x = 3" , "y = 4" ,
59
59
"sub" , "x = 1" , "y = 2" , "z = 3" ,
60
60
"swift struct c member" ])
61
- self .expect ("ta v typedef" , substrs = ["x = 5" , "y = 6" ])
62
- self .expect ("ta v union" , substrs = ["(DoubleLongUnion)" , "long_val = 42" ])
63
- self .expect ("ta v fromSubmodule" ,
61
+ self .expect ("target variable typedef" , substrs = ["x = 5" , "y = 6" ])
62
+ self .expect ("target variable union" ,
63
+ substrs = ["(DoubleLongUnion)" , "long_val = 42" ])
64
+ self .expect ("target variable fromSubmodule" ,
64
65
substrs = ["(FromSubmodule)" , "x = 1" , "y = 2" , "z = 3" ])
65
66
process .Clear ()
66
67
target .Clear ()
67
68
lldb .SBDebugger .MemoryPressureDetected ()
68
69
70
+ @skipIf (archs = ['ppc64le' ], bugnumber = 'SR-10214' )
71
+ @swiftTest
72
+ # This test needs a working Remote Mirrors implementation.
73
+ @skipIf (oslist = ['linux' , 'windows' ])
74
+ def test_dwarf_importer_exprs (self ):
75
+ lldb .SBDebugger .MemoryPressureDetected ()
76
+ self .runCmd ("settings set symbols.use-swift-dwarfimporter true" )
77
+ self .build ()
78
+ target , process , thread , bkpt = lldbutil .run_to_source_breakpoint (
79
+ self , 'break here' , lldb .SBFileSpec ('main.swift' ))
80
+ lldbutil .check_variable (self ,
81
+ target .FindFirstGlobalVariable ("pureSwift" ),
82
+ value = "42" )
83
+ lldbutil .check_variable (self ,
84
+ target .FindFirstGlobalVariable ("point" ),
85
+ typename = '__ObjC.Point' , num_children = 2 )
86
+ self .expect ("expr point" , substrs = ["x = 1" , "y = 2" ])
87
+ self .expect ("expr enumerator" , substrs = [".yellow" ])
88
+ self .expect ("expr pureSwiftStruct" , substrs = ["pure swift" ])
89
+ self .expect ("expr swiftStructCMember" ,
90
+ substrs = ["point" , "x = 3" , "y = 4" ,
91
+ "sub" , "x = 1" , "y = 2" , "z = 3" ,
92
+ "swift struct c member" ])
93
+ self .expect ("expr typedef" , substrs = ["x = 5" , "y = 6" ])
94
+ # FIXME: lookup fails for:
95
+ # a.union.unsafeMutableAddressor : __C.DoubleLongUnion
96
+ self .expect ("expr union" , error = True )
97
+ #self.expect("expr union", substrs=["(DoubleLongUnion)", "long_val = 42"])
98
+ self .expect ("expr fromSubmodule" ,
99
+ substrs = ["(FromSubmodule)" , "x = 1" , "y = 2" , "z = 3" ])
100
+ process .Clear ()
101
+ target .Clear ()
102
+ lldb .SBDebugger .MemoryPressureDetected ()
103
+
69
104
@skipIf (archs = ['ppc64le' ], bugnumber = 'SR-10214' )
70
105
@swiftTest
71
106
def test_negative (self ):
@@ -81,7 +116,7 @@ def test_negative(self):
81
116
target .FindFirstGlobalVariable ("point" ),
82
117
typename = "Point" , num_children = 2 )
83
118
# This works as a Clang type.
84
- self .expect ("ta v point" , substrs = ["x = 1" , "y = 2" ])
119
+ self .expect ("target variable point" , substrs = ["x = 1" , "y = 2" ])
85
120
# This can't be resolved.
86
121
lldbutil .check_variable (self ,
87
122
target .FindFirstGlobalVariable ("swiftStructCMember" ),
@@ -97,4 +132,3 @@ def test_negative(self):
97
132
process .Clear ()
98
133
target .Clear ()
99
134
lldb .SBDebugger .MemoryPressureDetected ()
100
- self .runCmd ("settings set symbols.use-swift-dwarfimporter true" )
0 commit comments