Skip to content

Commit 33584fd

Browse files
Merge pull request #10562 from adrian-prantl/cherry-pick-next-lldb-Use-the-static-value-in-lldbutil.check_variable-when-use_dynamic-False
[Cherry-pick into next] [lldb] Use the static value in lldbutil.check_variable when use_dynamic=False
2 parents 9e9e441 + ed6294a commit 33584fd

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,8 @@ def check_variable(
15411541
valobj.IsDynamic(),
15421542
"dynamic value of %s is not dynamic" % (name if valobj else "<unknown>"),
15431543
)
1544+
else:
1545+
valobj = valobj.GetStaticValue()
15441546
if use_synthetic:
15451547
valobj.SetPreferSyntheticValue(True)
15461548
if summary:

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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)