From ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:12:36 +0000 Subject: Vendor import of lldb trunk r321017: https://llvm.org/svn/llvm-project/lldb/trunk@321017 --- .../test/expression_command/top-level/dummy.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp') 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 31204b21d972..fa49bd4bda7e 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 -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; } -- cgit v1.2.3