summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/expression_command
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:36 +0000
commitef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (patch)
tree27916256fdeeb57d10d2f3d6948be5d71a703215 /packages/Python/lldbsuite/test/expression_command
parent76e0736e7fcfeb179779e49c05604464b1ccd704 (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/expression_command')
-rw-r--r--packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/expression_command/call-function/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py15
-rw-r--r--packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py5
-rw-r--r--packages/Python/lldbsuite/test/expression_command/fixits/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py4
-rw-r--r--packages/Python/lldbsuite/test/expression_command/po_verbosity/Makefile2
-rw-r--r--packages/Python/lldbsuite/test/expression_command/po_verbosity/main.m2
-rw-r--r--packages/Python/lldbsuite/test/expression_command/top-level/Makefile13
-rw-r--r--packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py17
-rw-r--r--packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp16
-rw-r--r--packages/Python/lldbsuite/test/expression_command/top-level/dummy.mk6
12 files changed, 42 insertions, 59 deletions
diff --git a/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile b/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile
index 7df664ac43e3d..8a7102e347af2 100644
--- a/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile
+++ b/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile
@@ -2,11 +2,4 @@ LEVEL = ../../make
CXX_SOURCES := main.cpp
-# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
-# targets. Other targets do not, which causes this test to fail.
-# This flag enables FullDebugInfo for all targets.
-ifneq (,$(findstring clang,$(CC)))
- CFLAGS_EXTRAS += -fno-limit-debug-info
-endif
-
include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/expression_command/call-function/Makefile b/packages/Python/lldbsuite/test/expression_command/call-function/Makefile
index d4b82b3db2766..9d4f3b7f14124 100644
--- a/packages/Python/lldbsuite/test/expression_command/call-function/Makefile
+++ b/packages/Python/lldbsuite/test/expression_command/call-function/Makefile
@@ -2,13 +2,6 @@ LEVEL = ../../make
CXX_SOURCES := main.cpp
-# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
-# targets. Other targets do not, which causes this test to fail.
-# This flag enables FullDebugInfo for all targets.
-ifneq (,$(findstring clang,$(CC)))
- CFLAGS_EXTRAS += -fno-limit-debug-info
-endif
-
include $(LEVEL)/Makefile.rules
clean::
diff --git a/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py b/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py
index 6645692f93ee6..16736f798528a 100644
--- a/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py
+++ b/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py
@@ -26,9 +26,6 @@ class ExprCommandCallFunctionTestCase(TestBase):
@expectedFailureAll(
compiler="icc",
bugnumber="llvm.org/pr14437, fails with ICC 13.1")
- @expectedFailureAll(
- oslist=['freebsd'],
- bugnumber='llvm.org/pr17807 Fails on FreeBSD buildbot')
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
def test_with(self):
"""Test calling std::String member function."""
@@ -47,5 +44,13 @@ class ExprCommandCallFunctionTestCase(TestBase):
# Calling this function now succeeds, but we follow the typedef return type through to
# const char *, and thus don't invoke the Summary formatter.
- self.expect("print str.c_str()",
- substrs=['Hello world'])
+
+ # clang's libstdc++ on ios arm64 inlines std::string::c_str() always;
+ # skip this part of the test.
+ triple = self.dbg.GetSelectedPlatform().GetTriple()
+ do_cstr_test = True
+ if triple == "arm64-apple-ios" or triple == "arm64-apple-tvos" or triple == "armv7k-apple-watchos" or triple == "arm64-apple-bridgeos":
+ do_cstr_test = False
+ if do_cstr_test:
+ self.expect("print str.c_str()",
+ substrs=['Hello world'])
diff --git a/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py b/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
index 74991999d926a..445979f5c701d 100644
--- a/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
+++ b/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
@@ -58,7 +58,10 @@ class ExprCharTestCase(TestBase):
@expectedFailureAll(
archs=[
"i[3-6]86",
- "x86_64"],
+ "x86_64",
+ "arm64",
+ 'armv7',
+ 'armv7k'],
bugnumber="llvm.org/pr23069, <rdar://problem/28721938>")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
@expectedFailureAll(triple='mips*', bugnumber="llvm.org/pr23069")
diff --git a/packages/Python/lldbsuite/test/expression_command/fixits/Makefile b/packages/Python/lldbsuite/test/expression_command/fixits/Makefile
index 7df664ac43e3d..8a7102e347af2 100644
--- a/packages/Python/lldbsuite/test/expression_command/fixits/Makefile
+++ b/packages/Python/lldbsuite/test/expression_command/fixits/Makefile
@@ -2,11 +2,4 @@ LEVEL = ../../make
CXX_SOURCES := main.cpp
-# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
-# targets. Other targets do not, which causes this test to fail.
-# This flag enables FullDebugInfo for all targets.
-ifneq (,$(findstring clang,$(CC)))
- CFLAGS_EXTRAS += -fno-limit-debug-info
-endif
-
include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py b/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
index b99fb727e8a5d..e6c9d43adf04c 100644
--- a/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
+++ b/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
@@ -22,10 +22,8 @@ class PersistObjCPointeeType(TestBase):
self.line = line_number('main.m', '// break here')
@skipUnlessDarwin
- @expectedFailureAll(
- bugnumber='http://llvm.org/pr23504',
- oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
@skipIf(archs=["i386", "i686"])
+ @skipIf(debug_info="gmodules", archs=['arm64', 'armv7', 'armv7k']) # compile error with gmodules for iOS
def test_with(self):
"""Test that we can p *objcObject"""
self.build()
diff --git a/packages/Python/lldbsuite/test/expression_command/po_verbosity/Makefile b/packages/Python/lldbsuite/test/expression_command/po_verbosity/Makefile
index 4464e2ee9f5cf..b6592745356d9 100644
--- a/packages/Python/lldbsuite/test/expression_command/po_verbosity/Makefile
+++ b/packages/Python/lldbsuite/test/expression_command/po_verbosity/Makefile
@@ -3,4 +3,4 @@ LEVEL = ../../make
OBJC_SOURCES := main.m
include $(LEVEL)/Makefile.rules
-LDFLAGS += -framework Cocoa
+LDFLAGS += -framework Foundation
diff --git a/packages/Python/lldbsuite/test/expression_command/po_verbosity/main.m b/packages/Python/lldbsuite/test/expression_command/po_verbosity/main.m
index 3dbb024b28096..9c79f850bf281 100644
--- a/packages/Python/lldbsuite/test/expression_command/po_verbosity/main.m
+++ b/packages/Python/lldbsuite/test/expression_command/po_verbosity/main.m
@@ -1,4 +1,4 @@
-#import <Cocoa/Cocoa.h>
+#import <Foundation/Foundation.h>
int main()
{
diff --git a/packages/Python/lldbsuite/test/expression_command/top-level/Makefile b/packages/Python/lldbsuite/test/expression_command/top-level/Makefile
index 7146f227b98ab..48eec5c5d2683 100644
--- a/packages/Python/lldbsuite/test/expression_command/top-level/Makefile
+++ b/packages/Python/lldbsuite/test/expression_command/top-level/Makefile
@@ -1,12 +1,13 @@
LEVEL = ../../make
-default: a.out dummy
-
CXX_SOURCES := main.cpp test.cpp
-dummy: dummy.cpp
+include $(LEVEL)/Makefile.rules
-clean::
- rm -rf dummy dummy.dSYM
+a.out: dummy
-include $(LEVEL)/Makefile.rules
+dummy:
+ $(MAKE) -f dummy.mk
+
+clean::
+ $(MAKE) -f dummy.mk clean
diff --git a/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py b/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py
index 137c403988707..dfe95a1a9fa7a 100644
--- a/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py
+++ b/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py
@@ -57,23 +57,6 @@ class TopLevelExpressionsTestCase(TestBase):
self.runCmd("run", RUN_SUCCEEDED)
@add_test_categories(['pyapi'])
- @expectedFailureAndroid(api_levels=[21, 22], bugnumber="llvm.org/pr27787")
- @expectedFailureAll(
- oslist=["linux"],
- archs=[
- "arm",
- "aarch64"],
- bugnumber="llvm.org/pr27787")
- @expectedFailureAll(
- bugnumber="llvm.org/pr28353",
- oslist=["linux"],
- archs=[
- "i386",
- "x86_64"],
- compiler="gcc",
- compiler_version=[
- "<",
- "4.9"])
@skipIf(debug_info="gmodules") # not relevant
@skipIf(oslist=["windows"]) # Error in record layout on Windows
def test_top_level_expressions(self):
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;
}
diff --git a/packages/Python/lldbsuite/test/expression_command/top-level/dummy.mk b/packages/Python/lldbsuite/test/expression_command/top-level/dummy.mk
new file mode 100644
index 0000000000000..af97678b2cf53
--- /dev/null
+++ b/packages/Python/lldbsuite/test/expression_command/top-level/dummy.mk
@@ -0,0 +1,6 @@
+LEVEL = ../../make
+
+CXX_SOURCES := dummy.cpp
+EXE := dummy
+
+include $(LEVEL)/Makefile.rules