Skip to content

Commit 3db9a8c

Browse files
Merge pull request #10547 from adrian-prantl/check_var
[lldb] Use the static value in lldbutil.check_variable when use_dynam…
2 parents 2bda15f + 6d148b4 commit 3db9a8c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lldb/packages/Python/lldbsuite/test/lldbutil.py

+2
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,8 @@ def check_variable(
15791579
valobj.IsDynamic(),
15801580
"dynamic value of %s is not dynamic" % (name if valobj else "<unknown>"),
15811581
)
1582+
else:
1583+
valobj = valobj.GetStaticValue()
15821584
if use_synthetic:
15831585
valobj.SetPreferSyntheticValue(True)
15841586
if summary:

lldb/test/API/lang/swift/async/frame/variable/TestSwiftAsyncFrameVar.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test(self):
2525
b = frame.FindVariable("b")
2626
self.assertFalse(b.IsValid())
2727
d = frame.FindVariable("d")
28-
lldbutil.check_variable(self, d, False, value='23')
28+
lldbutil.check_variable(self, d, use_dynamic=True, value='23')
2929

3030
# The first breakpoint resolves to multiple locations, but only the
3131
# first location is needed. Now that we've stopped, delete it to
@@ -46,4 +46,4 @@ def test(self):
4646
self.assertTrue(b.IsValid())
4747
self.assertGreater(b.unsigned, 0)
4848
d = frame.FindVariable("d")
49-
lldbutil.check_variable(self, d, False, value='23')
49+
lldbutil.check_variable(self, d, use_dynamic=True, value='23')

lldb/test/API/lang/swift/metatype/TestSwiftMetatype.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ def test_metatype(self):
3737
var_p = frame.FindVariable("p")
3838
lldbutil.check_variable(self, var_s, False, "String")
3939
lldbutil.check_variable(self, var_c, False, "@thick a.D.Type")
40-
lldbutil.check_variable(self, var_f, False, '@thick ((Int) -> Int).Type')
40+
lldbutil.check_variable(self, var_f, True, '@thick ((Int) -> Int).Type')
4141
lldbutil.check_variable(self, var_t, False, "(Int, Int, String)")
4242
lldbutil.check_variable(self, var_p, False, "a.P")

0 commit comments

Comments
 (0)