summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2018-03-16 22:12:22 +0000
committerFrederic Riss <friss@apple.com>2018-03-16 22:12:22 +0000
commitcce4af160cade64cfd0fdda9fdb320a26d145ca8 (patch)
tree64287d8be3d91eec6b3743171f94b14fa3154ac8 /lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
parentf6766b0e4554a2137fb281ed69f6c91e2fe8e839 (diff)
downloadbcm5719-llvm-cce4af160cade64cfd0fdda9fdb320a26d145ca8.tar.gz
bcm5719-llvm-cce4af160cade64cfd0fdda9fdb320a26d145ca8.zip
[DWARFASTParserClang] Complete external record types before using them as a decl context.
Summary: When in a gmodules-like debugging scenario, you can have a parent decl context that gets imported from an external AST. When this happens, we must be careful to complete this type before adding children to it, otherwise it sometimes results in a crash. Reviewers: clayborg, jingham Subscribers: aprantl, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D43592 llvm-svn: 327750
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
index b9f25537258..20207c54db9 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
@@ -69,3 +69,26 @@ class TestWithGmodulesDebugInfo(TestBase):
42,
memberValue.GetValueAsSigned(),
"Member value incorrect")
+
+ testValue = frame.EvaluateExpression("bar")
+ self.assertTrue(
+ testValue.GetError().Success(),
+ "Test expression value invalid: %s" %
+ (testValue.GetError().GetCString()))
+ self.assertTrue(
+ testValue.GetTypeName() == "Foo::Bar",
+ "Test expression type incorrect")
+
+ memberValue = testValue.GetChildMemberWithName("i")
+ self.assertTrue(
+ memberValue.GetError().Success(),
+ "Member value missing or invalid: %s" %
+ (testValue.GetError().GetCString()))
+ self.assertTrue(
+ memberValue.GetTypeName() == "int",
+ "Member type incorrect")
+ self.assertEqual(
+ 123,
+ memberValue.GetValueAsSigned(),
+ "Member value incorrect")
+
OpenPOWER on IntegriCloud