From f8877efc8ba64360179b85af9fd019aae549d1a7 Mon Sep 17 00:00:00 2001 From: Siva Chandra Date: Thu, 16 Jul 2015 01:47:12 +0000 Subject: Add a class ValueObjectConstResultCast. Summary: Other changes around the main change include: 1. Add a method Cast to ValueObjectConstResult, ValueObjectConstResultImpl and ValueObjectConstResultChild. 2. Add an argument |live_address| of type lldb::addr_t to the constructor of ValueObjectConstResultChild. This is passed on to the backing ValueObjectConstResultImpl object constructor so that the address of the child value can be calculated properly. Reviewers: granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11203 llvm-svn: 242374 --- lldb/test/python_api/value/TestValueAPI.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lldb/test/python_api/value/TestValueAPI.py') diff --git a/lldb/test/python_api/value/TestValueAPI.py b/lldb/test/python_api/value/TestValueAPI.py index 60239762a7f..0839c37055c 100644 --- a/lldb/test/python_api/value/TestValueAPI.py +++ b/lldb/test/python_api/value/TestValueAPI.py @@ -137,6 +137,12 @@ class ValueAPITestCase(TestBase): self.DebugSBValue(val2) self.assertTrue(child.GetValue() == val2.GetValue() and child.GetSummary() == val2.GetSummary()) + + val_i = target.EvaluateExpression('i') + val_s = target.EvaluateExpression('s') + val_a = target.EvaluateExpression('a') + self.assertTrue(val_s.GetChildMemberWithName('a').AddressOf(), VALID_VARIABLE) + self.assertTrue(val_a.Cast(val_i.GetType()).AddressOf(), VALID_VARIABLE) if __name__ == '__main__': import atexit -- cgit v1.2.3