summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp')
-rw-r--r--packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp b/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp
index 31204b21d972a..fa49bd4bda7e3 100644
--- a/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp
+++ b/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp
@@ -1,7 +1,15 @@
#include <stdio.h>
-int main()
-{
- printf("This is a dummy\n"); // Set breakpoint here
- return 0;
+// These are needed to make sure that the linker does not strip the parts of the
+// C++ abi library that are necessary to execute the expressions in the
+// debugger. It would be great if we did not need to do this, but the fact that
+// LLDB cannot conjure up the abi library on demand is not relevant for testing
+// top level expressions.
+struct DummyA {};
+struct DummyB : public virtual DummyA {};
+
+int main() {
+ DummyB b;
+ printf("This is a dummy\n"); // Set breakpoint here
+ return 0;
}