summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py23
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp3
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/pch.h5
3 files changed, 31 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")
+
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp
index aa401368517..588a3a8e01f 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp
@@ -1,5 +1,8 @@
+class Foo::Bar { int i = 123; };
+
int main(int argc, const char * argv[])
{
IntContainer test(42);
+ Foo::Bar bar;
return 0; // break here
}
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/pch.h b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/pch.h
index a6c59b94c89..dba4fee9a8c 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/pch.h
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/pch.h
@@ -10,3 +10,8 @@ class GenericContainer {
};
typedef GenericContainer<int> IntContainer;
+
+struct Foo {
+ class Bar;
+ Bar *bar;
+};
OpenPOWER on IntegriCloud