summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-10-30 00:04:29 +0000
committerEnrico Granata <egranata@apple.com>2013-10-30 00:04:29 +0000
commit38c546320c41359278c954efa3e1719b2e12505c (patch)
tree8219a471056f25748c5cccd998b323929d44bbde /lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
parent5fbce5bd56bd58d221b4224a02377774f943515c (diff)
downloadbcm5719-llvm-38c546320c41359278c954efa3e1719b2e12505c.tar.gz
bcm5719-llvm-38c546320c41359278c954efa3e1719b2e12505c.zip
<rdar://problem/15045059>
One of the things that dynamic typing affects is the count of children a type has Clear out the flag that makes us blindly believe the children count when a dynamic type change is detected llvm-svn: 193663
Diffstat (limited to 'lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py')
-rw-r--r--lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
index 0778eed71de..5f5901c7903 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
@@ -40,6 +40,16 @@ class DynamicValueTestCase(TestBase):
self.main_second_call_line = line_number('pass-to-base.cpp',
'// Break here and get real address of reallyA.')
+ self.main_third_call_line = line_number('pass-to-base.cpp',
+ '// Break here and check b has 0 children')
+ self.main_fourth_call_line = line_number('pass-to-base.cpp',
+ '// Break here and check b still has 0 children')
+ self.main_fifth_call_line = line_number('pass-to-base.cpp',
+ '// Break here and check b has one child now')
+
+
+
+
def examine_value_object_of_this_ptr (self, this_static, this_dynamic, dynamic_location):
# Get "this" as its static value
@@ -119,6 +129,15 @@ class DynamicValueTestCase(TestBase):
second_call_bpt = target.BreakpointCreateByLocation('pass-to-base.cpp', self.main_second_call_line)
self.assertTrue(second_call_bpt,
VALID_BREAKPOINT)
+ third_call_bpt = target.BreakpointCreateByLocation('pass-to-base.cpp', self.main_third_call_line)
+ self.assertTrue(third_call_bpt,
+ VALID_BREAKPOINT)
+ fourth_call_bpt = target.BreakpointCreateByLocation('pass-to-base.cpp', self.main_fourth_call_line)
+ self.assertTrue(fourth_call_bpt,
+ VALID_BREAKPOINT)
+ fifth_call_bpt = target.BreakpointCreateByLocation('pass-to-base.cpp', self.main_fifth_call_line)
+ self.assertTrue(fifth_call_bpt,
+ VALID_BREAKPOINT)
# Now launch the process, and do not stop at the entry point.
process = target.LaunchSimple (None, None, os.getcwd())
@@ -232,6 +251,14 @@ class DynamicValueTestCase(TestBase):
self.assertTrue (anotherA_loc == reallyA_loc)
self.assertTrue (anotherA_value.GetTypeName().find ('B') == -1)
+ self.runCmd("continue")
+ b = self.frame().FindVariable("b").GetDynamicValue(lldb.eDynamicCanRunTarget)
+ self.assertTrue(b.GetNumChildren() == 0, "b has 0 children")
+ self.runCmd("continue")
+ self.assertTrue(b.GetNumChildren() == 0, "b still has 0 children")
+ self.runCmd("continue")
+ self.assertTrue(b.GetNumChildren() == 1, "b now has 1 child")
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
OpenPOWER on IntegriCloud