@@ -10,6 +10,18 @@ class TestSwiftEmbeddedFrameVariable(TestBase):
10
10
@swiftTest
11
11
def test (self ):
12
12
self .build ()
13
+ self .implementation ()
14
+
15
+ @skipUnlessDarwin
16
+ @swiftTest
17
+ def test_without_ast (self ):
18
+ """Run the test turning off instantion of Swift AST contexts in order to ensure that all type information comes from DWARF"""
19
+ self .build ()
20
+ self .runCmd ("setting set symbols.swift-enable-ast-context false" )
21
+ self .implementation ()
22
+
23
+ def implementation (self ):
24
+ self .runCmd ("setting set symbols.swift-enable-full-dwarf-debugging true" )
13
25
14
26
target , process , thread , _ = lldbutil .run_to_source_breakpoint (
15
27
self , "break here" , lldb .SBFileSpec ("main.swift" )
@@ -19,153 +31,151 @@ def test(self):
19
31
20
32
varB = frame .FindVariable ("varB" )
21
33
field = varB .GetChildMemberWithName ("a" ).GetChildMemberWithName ("field" )
22
- lldbutil .check_variable (self , field , False , value = ' 4.5' )
34
+ lldbutil .check_variable (self , field , False , value = " 4.5" )
23
35
b = varB .GetChildMemberWithName ("b" )
24
- lldbutil .check_variable (self , b , False , value = ' 123456' )
36
+ lldbutil .check_variable (self , b , False , value = " 123456" )
25
37
26
38
tuple = frame .FindVariable ("tuple" )
27
39
first = tuple .GetChildAtIndex (0 )
28
40
field = first .GetChildMemberWithName ("field" )
29
- lldbutil .check_variable (self , field , False , value = ' 4.5' )
41
+ lldbutil .check_variable (self , field , False , value = " 4.5" )
30
42
second = tuple .GetChildAtIndex (1 )
31
43
a = second .GetChildMemberWithName ("a" )
32
44
field = a .GetChildMemberWithName ("field" )
33
- lldbutil .check_variable (self , field , False , value = ' 4.5' )
45
+ lldbutil .check_variable (self , field , False , value = " 4.5" )
34
46
b = second .GetChildMemberWithName ("b" )
35
- lldbutil .check_variable (self , b , False , value = ' 123456' )
47
+ lldbutil .check_variable (self , b , False , value = " 123456" )
36
48
37
49
nonPayload1 = frame .FindVariable ("nonPayload1" )
38
- lldbutil .check_variable (self , nonPayload1 , False , value = ' one' )
50
+ lldbutil .check_variable (self , nonPayload1 , False , value = " one" )
39
51
40
52
nonPayload2 = frame .FindVariable ("nonPayload2" )
41
- lldbutil .check_variable (self , nonPayload2 , False , value = ' two' )
53
+ lldbutil .check_variable (self , nonPayload2 , False , value = " two" )
42
54
43
55
singlePayload = frame .FindVariable ("singlePayload" )
44
- payload = singlePayload .GetChildMemberWithName (' payload' )
45
- field = payload .GetChildMemberWithName ('a' ).GetChildMemberWithName (' field' )
46
- lldbutil .check_variable (self , field , False , value = ' 4.5' )
47
- b = payload .GetChildMemberWithName ('b' )
48
- lldbutil .check_variable (self , b , False , value = ' 123456' )
56
+ payload = singlePayload .GetChildMemberWithName (" payload" )
57
+ field = payload .GetChildMemberWithName ("a" ).GetChildMemberWithName (" field" )
58
+ lldbutil .check_variable (self , field , False , value = " 4.5" )
59
+ b = payload .GetChildMemberWithName ("b" )
60
+ lldbutil .check_variable (self , b , False , value = " 123456" )
49
61
50
62
emptySinglePayload = frame .FindVariable ("emptySinglePayload" )
51
- lldbutil .check_variable (self , emptySinglePayload , False , value = ' nonPayloadTwo' )
63
+ lldbutil .check_variable (self , emptySinglePayload , False , value = " nonPayloadTwo" )
52
64
53
65
smallMultipayloadEnum1 = frame .FindVariable ("smallMultipayloadEnum1" )
54
66
one = smallMultipayloadEnum1 .GetChildMemberWithName ("one" )
55
- lldbutil .check_variable (self , one , False , value = ' two' )
67
+ lldbutil .check_variable (self , one , False , value = " two" )
56
68
57
69
smallMultipayloadEnum2 = frame .FindVariable ("smallMultipayloadEnum2" )
58
70
two = smallMultipayloadEnum2 .GetChildMemberWithName ("two" )
59
- lldbutil .check_variable (self , two , False , value = 'one' )
60
-
71
+ lldbutil .check_variable (self , two , False , value = "one" )
61
72
62
73
bigMultipayloadEnum1 = frame .FindVariable ("bigMultipayloadEnum1" )
63
74
one = bigMultipayloadEnum1 .GetChildMemberWithName ("one" )
64
75
first = one .GetChildAtIndex (0 ).GetChildMemberWithName ("supField" )
65
76
second = one .GetChildAtIndex (1 ).GetChildMemberWithName ("supField" )
66
77
third = one .GetChildAtIndex (2 ).GetChildMemberWithName ("supField" )
67
- lldbutil .check_variable (self , first , False , value = '42' )
68
- lldbutil .check_variable (self , second , False , value = '43' )
69
- lldbutil .check_variable (self , third , False , value = '44' )
70
-
78
+ lldbutil .check_variable (self , first , False , value = "42" )
79
+ lldbutil .check_variable (self , second , False , value = "43" )
80
+ lldbutil .check_variable (self , third , False , value = "44" )
71
81
72
82
fullMultipayloadEnum1 = frame .FindVariable ("fullMultipayloadEnum1" )
73
83
one = fullMultipayloadEnum1 .GetChildMemberWithName ("one" )
74
- lldbutil .check_variable (self , one , False , value = ' 120' )
84
+ lldbutil .check_variable (self , one , False , value = " 120" )
75
85
76
86
fullMultipayloadEnum2 = frame .FindVariable ("fullMultipayloadEnum2" )
77
87
two = fullMultipayloadEnum2 .GetChildMemberWithName ("two" )
78
- lldbutil .check_variable (self , two , False , value = ' 9.5' )
88
+ lldbutil .check_variable (self , two , False , value = " 9.5" )
79
89
80
90
bigFullMultipayloadEnum1 = frame .FindVariable ("bigFullMultipayloadEnum1" )
81
91
one = bigFullMultipayloadEnum1 .GetChildMemberWithName ("one" )
82
92
first = one .GetChildAtIndex (0 )
83
93
second = one .GetChildAtIndex (1 )
84
- lldbutil .check_variable (self , first , False , value = ' 209' )
85
- lldbutil .check_variable (self , second , False , value = ' 315' )
94
+ lldbutil .check_variable (self , first , False , value = " 209" )
95
+ lldbutil .check_variable (self , second , False , value = " 315" )
86
96
87
97
bigFullMultipayloadEnum2 = frame .FindVariable ("bigFullMultipayloadEnum2" )
88
98
two = bigFullMultipayloadEnum2 .GetChildMemberWithName ("two" )
89
99
first = two .GetChildAtIndex (0 )
90
100
second = two .GetChildAtIndex (1 )
91
- lldbutil .check_variable (self , first , False , value = '452.5' )
92
- lldbutil .check_variable (self , second , False , value = '753.5' )
93
-
101
+ lldbutil .check_variable (self , first , False , value = "452.5" )
102
+ lldbutil .check_variable (self , second , False , value = "753.5" )
94
103
95
104
sup = frame .FindVariable ("sup" )
96
105
supField = sup .GetChildMemberWithName ("supField" )
97
- lldbutil .check_variable (self , supField , False , value = '42' )
106
+ lldbutil .check_variable (self , supField , False , value = "42" )
98
107
99
108
sub = frame .FindVariable ("sub" )
100
109
supField = sub .GetChildMemberWithName ("supField" )
101
- lldbutil .check_variable (self , supField , False , value = '42' )
110
+ lldbutil .check_variable (self , supField , False , value = "42" )
102
111
subField = sub .GetChildMemberWithName ("subField" )
103
112
a = subField .GetChildMemberWithName ("a" )
104
113
field = a .GetChildMemberWithName ("field" )
105
- lldbutil .check_variable (self , field , False , value = ' 4.5' )
114
+ lldbutil .check_variable (self , field , False , value = " 4.5" )
106
115
b = subField .GetChildMemberWithName ("b" )
107
- lldbutil .check_variable (self , b , False , value = ' 123456' )
116
+ lldbutil .check_variable (self , b , False , value = " 123456" )
108
117
109
118
subSub = frame .FindVariable ("subSub" )
110
119
supField = subSub .GetChildMemberWithName ("supField" )
111
- lldbutil .check_variable (self , supField , False , value = '42' )
120
+ lldbutil .check_variable (self , supField , False , value = "42" )
112
121
subField = subSub .GetChildMemberWithName ("subField" )
113
122
a = subField .GetChildMemberWithName ("a" )
114
123
field = a .GetChildMemberWithName ("field" )
115
- lldbutil .check_variable (self , field , False , value = ' 4.5' )
124
+ lldbutil .check_variable (self , field , False , value = " 4.5" )
116
125
b = subField .GetChildMemberWithName ("b" )
117
- lldbutil .check_variable (self , b , False , value = ' 123456' )
126
+ lldbutil .check_variable (self , b , False , value = " 123456" )
118
127
119
- subSubField = subSub .GetChildMemberWithName ("subSubField" ).GetChildMemberWithName ("field" )
120
- lldbutil .check_variable (self , subSubField , False , value = '4.5' )
128
+ subSubField = subSub .GetChildMemberWithName (
129
+ "subSubField"
130
+ ).GetChildMemberWithName ("field" )
131
+ lldbutil .check_variable (self , subSubField , False , value = "4.5" )
121
132
122
133
gsp = frame .FindVariable ("gsp" )
123
134
t = gsp .GetChildMemberWithName ("t" )
124
- lldbutil .check_variable (self , t , False , value = '42' )
135
+ lldbutil .check_variable (self , t , False , value = "42" )
125
136
u = gsp .GetChildMemberWithName ("u" )
126
- lldbutil .check_variable (self , u , False , value = ' 94.5' )
137
+ lldbutil .check_variable (self , u , False , value = " 94.5" )
127
138
128
139
gsp2 = frame .FindVariable ("gsp2" )
129
140
t = gsp2 .GetChildMemberWithName ("t" )
130
141
supField = t .GetChildMemberWithName ("supField" )
131
- lldbutil .check_variable (self , supField , False , value = '42' )
142
+ lldbutil .check_variable (self , supField , False , value = "42" )
132
143
u = gsp2 .GetChildMemberWithName ("u" )
133
144
a = u .GetChildMemberWithName ("a" )
134
145
field = a .GetChildMemberWithName ("field" )
135
- lldbutil .check_variable (self , field , False , value = ' 4.5' )
146
+ lldbutil .check_variable (self , field , False , value = " 4.5" )
136
147
b = u .GetChildMemberWithName ("b" )
137
- lldbutil .check_variable (self , b , False , value = ' 123456' )
148
+ lldbutil .check_variable (self , b , False , value = " 123456" )
138
149
139
150
gsp3 = frame .FindVariable ("gsp3" )
140
151
t = gsp3 .GetChildMemberWithName ("t" )
141
152
one = t .GetChildMemberWithName ("one" )
142
153
first = one .GetChildAtIndex (0 )
143
154
second = one .GetChildAtIndex (1 )
144
- lldbutil .check_variable (self , first , False , value = ' 209' )
145
- lldbutil .check_variable (self , second , False , value = ' 315' )
155
+ lldbutil .check_variable (self , first , False , value = " 209" )
156
+ lldbutil .check_variable (self , second , False , value = " 315" )
146
157
u = gsp3 .GetChildMemberWithName ("u" )
147
158
two = u .GetChildMemberWithName ("two" )
148
- lldbutil .check_variable (self , two , False , value = ' one' )
159
+ lldbutil .check_variable (self , two , False , value = " one" )
149
160
150
161
gcp = frame .FindVariable ("gcp" )
151
162
t = gcp .GetChildMemberWithName ("t" )
152
- lldbutil .check_variable (self , t , False , value = ' 55.5' )
163
+ lldbutil .check_variable (self , t , False , value = " 55.5" )
153
164
u = gcp .GetChildMemberWithName ("u" )
154
- lldbutil .check_variable (self , u , False , value = '9348' )
155
-
165
+ lldbutil .check_variable (self , u , False , value = "9348" )
156
166
157
167
either = frame .FindVariable ("either" )
158
168
left = either .GetChildMemberWithName ("left" )
159
- lldbutil .check_variable (self , left , False , value = ' 1234' )
169
+ lldbutil .check_variable (self , left , False , value = " 1234" )
160
170
161
171
either2 = frame .FindVariable ("either2" )
162
172
right = either2 .GetChildMemberWithName ("right" )
163
173
t = right .GetChildMemberWithName ("t" )
164
174
one = t .GetChildMemberWithName ("one" )
165
175
first = one .GetChildAtIndex (0 )
166
176
second = one .GetChildAtIndex (1 )
167
- lldbutil .check_variable (self , first , False , value = ' 209' )
168
- lldbutil .check_variable (self , second , False , value = ' 315' )
177
+ lldbutil .check_variable (self , first , False , value = " 209" )
178
+ lldbutil .check_variable (self , second , False , value = " 315" )
169
179
u = right .GetChildMemberWithName ("u" )
170
180
two = u .GetChildMemberWithName ("two" )
171
- lldbutil .check_variable (self , two , False , value = ' one' )
181
+ lldbutil .check_variable (self , two , False , value = " one" )
0 commit comments