diff options
Diffstat (limited to 'packages/Python/lldbsuite/test')
405 files changed, 2211 insertions, 676 deletions
diff --git a/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile b/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile new file mode 100644 index 000000000000..5d2224cb6560 --- /dev/null +++ b/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile @@ -0,0 +1,6 @@ +LEVEL = ../../make + +C_SOURCES := main.c +CFLAGS_EXTRAS = -mthumb + +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py b/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py new file mode 100644 index 000000000000..1abab39b1da3 --- /dev/null +++ b/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py @@ -0,0 +1,45 @@ +""" +Test that breakpoints in an IT instruction don't fire if their condition is +false. +""" +from __future__ import print_function + + +import lldb +import os +import time +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestBreakpointIt(TestBase): + + mydir = TestBase.compute_mydir(__file__) + NO_DEBUG_INFO_TESTCASE = True + + @skipIf(archs=no_match(["arm"])) + def test_false(self): + self.build() + exe = os.path.join(os.getcwd(), "a.out") + + self.runCmd("target create %s" % exe) + lldbutil.run_break_set_by_symbol(self, "bkpt_false", + extra_options="--skip-prologue 0") + + self.runCmd("run") + self.assertEqual(self.process().GetState(), lldb.eStateExited, + "Breakpoint does not get hit") + + @skipIf(archs=no_match(["arm"])) + def test_true(self): + self.build() + exe = os.path.join(os.getcwd(), "a.out") + + self.runCmd("target create %s" % exe) + bpid = lldbutil.run_break_set_by_symbol(self, "bkpt_true", + extra_options="--skip-prologue 0") + + self.runCmd("run") + self.assertIsNotNone(lldbutil.get_one_thread_stopped_at_breakpoint_id( + self.process(), bpid)) diff --git a/packages/Python/lldbsuite/test/arm/breakpoint-it/main.c b/packages/Python/lldbsuite/test/arm/breakpoint-it/main.c new file mode 100644 index 000000000000..35d57bb1b843 --- /dev/null +++ b/packages/Python/lldbsuite/test/arm/breakpoint-it/main.c @@ -0,0 +1,14 @@ +int main() { + int value; + asm ( + "cmp %1, %2\n\t" + "ite ne\n\t" + ".thumb_func\n\t" + "bkpt_true:\n\t" + "movne %0, %1\n\t" + ".thumb_func\n\t" + "bkpt_false:\n\t" + "moveq %0, %2\n\t" + : "=r" (value) : "r"(42), "r"(47)); + return value; +} diff --git a/packages/Python/lldbsuite/test/arm_emulation/TestEmulations.py b/packages/Python/lldbsuite/test/arm/emulation/TestEmulations.py index 4ddda525537c..4ddda525537c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/TestEmulations.py +++ b/packages/Python/lldbsuite/test/arm/emulation/TestEmulations.py diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-arm.dat index 64b2506f9d56..64b2506f9d56 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-thumb.dat index daa32d25a41a..daa32d25a41a 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-10-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-10-thumb.dat index bb3d760219b4..bb3d760219b4 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-10-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-10-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-11-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-11-thumb.dat index e26f2218cbcd..e26f2218cbcd 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-11-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-11-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-12-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-12-thumb.dat index a7f7344e7d97..a7f7344e7d97 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-12-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-12-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-arm.dat index cf6e0a9779a9..cf6e0a9779a9 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-thumb.dat index 9a178a0a159d..9a178a0a159d 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-3-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-arm.dat index 9fc44b79395c..9fc44b79395c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-3-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-thumb.dat index c8f96ec09d3e..c8f96ec09d3e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-4-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-arm.dat index 12b40ed76fce..12b40ed76fce 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-4-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-4-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-thumb.dat index 922b8ecdba53..922b8ecdba53 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-4-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-5-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-arm.dat index dfb6a87f014d..dfb6a87f014d 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-5-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-5-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-thumb.dat index 16ff517436b0..16ff517436b0 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-5-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-6-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-arm.dat index 8a87eff5f002..8a87eff5f002 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-6-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-6-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-thumb.dat index e8abd6950f20..e8abd6950f20 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-6-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-7-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-arm.dat index 312514246e3e..312514246e3e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-7-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-7-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-thumb.dat index 506071309d7c..506071309d7c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-7-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-8-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-arm.dat index 44a400f5287a..44a400f5287a 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-8-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-8-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-thumb.dat index 8bc6c789a51d..8bc6c789a51d 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-8-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-9-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-9-thumb.dat index 832af4cf0b48..832af4cf0b48 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-add-9-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-9-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-bic-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-arm.dat index c1cd4f15ab3e..c1cd4f15ab3e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-bic-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-bic-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-thumb.dat index c62422650182..c62422650182 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-bic-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-arm.dat index e1922d9edb9a..e1922d9edb9a 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-thumb.dat index 60a805e09d83..60a805e09d83 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-arm.dat index 99401bbd2e21..99401bbd2e21 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-thumb.dat index 39ecf947c6de..39ecf947c6de 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-3-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-arm.dat index 427d7b27485c..427d7b27485c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-3-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-thumb.dat index 9738073c038e..9738073c038e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldmia-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-arm.dat index 307402fd2f5c..307402fd2f5c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-thumb.dat index 471669b0cb65..471669b0cb65 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-10-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-10-thumb.dat index bc7693c9a684..bc7693c9a684 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-10-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-10-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-11-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-11-thumb.dat index b5bf18127cd6..b5bf18127cd6 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-11-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-11-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-12-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-12-thumb.dat index 5c3a5485f0b3..5c3a5485f0b3 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-12-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-12-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-arm.dat index 068297e3edce..068297e3edce 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-thumb.dat index 27727831d6d5..27727831d6d5 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-3-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-arm.dat index f0d6d8aaba63..f0d6d8aaba63 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-3-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-thumb.dat index 012e1c53e663..012e1c53e663 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-4-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-arm.dat index e2d2aa6aa887..e2d2aa6aa887 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-4-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-4-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-thumb.dat index 3eb6f167b488..3eb6f167b488 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-4-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-5-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-arm.dat index 45210d9600d9..45210d9600d9 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-5-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-5-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-thumb.dat index 45289e7e899c..45289e7e899c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-5-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-6-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-arm.dat index 0f379fd49809..0f379fd49809 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-6-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-6-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-thumb.dat index 5b3c119e7437..5b3c119e7437 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-6-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-7-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-arm.dat index ff425ef5284f..ff425ef5284f 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-7-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-7-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-thumb.dat index db8d58796ca8..db8d58796ca8 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-7-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-8-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-arm.dat index c11dfc133e5b..c11dfc133e5b 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-8-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-8-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-thumb.dat index 01d7013ceaaa..01d7013ceaaa 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-8-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-9-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-9-thumb.dat index cc3c4db2f4de..cc3c4db2f4de 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldr-9-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-9-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrd-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-arm.dat index 970f8aa7c0a4..970f8aa7c0a4 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrd-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrd-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-thumb.dat index 7ab41ce35dbe..7ab41ce35dbe 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrd-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrd-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-2-thumb.dat index 70fe6f5cfff7..70fe6f5cfff7 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrd-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrh-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrh-1-thumb.dat index 2a47002fb658..2a47002fb658 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrh-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrh-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrsh-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-1-arm.dat index cecf397f1d49..cecf397f1d49 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrsh-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrsh-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-2-arm.dat index 660b3d3b5db7..660b3d3b5db7 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-ldrsh-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-arm.dat index 232bc967fede..232bc967fede 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-thumb.dat index 569510dbd3ba..569510dbd3ba 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-10-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-10-thumb.dat index 6bf9b0d7ef7e..6bf9b0d7ef7e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-10-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-10-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-11-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-11-thumb.dat index 82043ef335b1..82043ef335b1 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-11-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-11-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-12-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-12-thumb.dat index 1fce18af917c..1fce18af917c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-12-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-12-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-13-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-13-thumb.dat index d1c1a4428c9f..d1c1a4428c9f 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-13-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-13-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-14-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-14-thumb.dat index dfd89c265fbd..dfd89c265fbd 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-14-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-14-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-15-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-15-thumb.dat index 0ff8e5d7dc5c..0ff8e5d7dc5c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-15-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-15-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-16-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-16-thumb.dat index 1baf42dfc56c..1baf42dfc56c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-16-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-16-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-17-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-17-thumb.dat index 70cee03fb54f..70cee03fb54f 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-17-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-17-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-18-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-18-thumb.dat index 1893e188b0d0..1893e188b0d0 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-18-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-18-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-19-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-19-thumb.dat index 238e16b4aa42..238e16b4aa42 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-19-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-19-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-arm.dat index 6d6c0cbf80c5..6d6c0cbf80c5 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-thumb.dat index ad6854427fbf..ad6854427fbf 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-20-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-20-thumb.dat index 15ecd2ebfa0a..15ecd2ebfa0a 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-20-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-20-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-21-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-21-thumb.dat index 6a38f1671b7c..6a38f1671b7c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-21-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-21-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-22-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-22-thumb.dat index 242b56824194..242b56824194 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-22-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-22-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-23-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-23-thumb.dat index 7f57440a8421..7f57440a8421 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-23-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-23-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-24-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-24-thumb.dat index 9a1756e8473b..9a1756e8473b 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-24-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-24-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-25-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-25-thumb.dat index c2fd6a739644..c2fd6a739644 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-25-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-25-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-26-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-26-thumb.dat index 2cc155d8071c..2cc155d8071c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-26-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-26-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-27-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-27-thumb.dat index 0b35377b08ee..0b35377b08ee 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-27-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-27-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-28-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-28-thumb.dat index f7d7778a2512..f7d7778a2512 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-28-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-28-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-29-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-29-thumb.dat index 5e9098f99d2f..5e9098f99d2f 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-29-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-29-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-3-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-arm.dat index 1fe7155bd3a3..1fe7155bd3a3 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-3-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-thumb.dat index 8ce129682bf9..8ce129682bf9 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-30-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-30-thumb.dat index a0dddad6b5a1..a0dddad6b5a1 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-30-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-30-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-31-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-31-thumb.dat index 20d8dc7c06f6..20d8dc7c06f6 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-31-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-31-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-4-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-arm.dat index 8ef83b268055..8ef83b268055 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-4-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-4-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-thumb.dat index f854ba26641e..f854ba26641e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-4-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-5-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-arm.dat index ee85779083f6..ee85779083f6 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-5-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-5-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-thumb.dat index d6140bdb92d7..d6140bdb92d7 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-5-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-6-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-arm.dat index 863a6d3e9bd8..863a6d3e9bd8 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-6-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-6-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-thumb.dat index fac96bf5a5a8..fac96bf5a5a8 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-6-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-7-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-7-thumb.dat index c537d30cb249..c537d30cb249 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-7-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-7-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-8-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-8-thumb.dat index b724c79a0d56..b724c79a0d56 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-8-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-8-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-9-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-9-thumb.dat index ccf7ea6c3423..ccf7ea6c3423 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mov-9-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-9-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-moveq-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-moveq-1-arm.dat index f46b1bfd6e87..f46b1bfd6e87 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-moveq-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-moveq-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-movs-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-movs-1-arm.dat index 38292508d43c..38292508d43c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-movs-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-movs-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-arm.dat index 024dd9fa4bcb..024dd9fa4bcb 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-thumb.dat index c5c385c8522d..c5c385c8522d 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-arm.dat index 10df542fcad5..10df542fcad5 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-thumb.dat index 3c2f6f4da279..3c2f6f4da279 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-3-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-arm.dat index 742708978b6d..742708978b6d 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-3-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-thumb.dat index ff4ca7331a9f..ff4ca7331a9f 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-4-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-arm.dat index 4efc18cc5f28..4efc18cc5f28 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-4-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-4-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-thumb.dat index f8b1569e9063..f8b1569e9063 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-mvn-4-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-arm.dat index 07163f80aeb6..07163f80aeb6 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-thumb.dat index fad6765be9a8..fad6765be9a8 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-arm.dat index 4b6ae43ca285..4b6ae43ca285 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-thumb.dat index 9f3efe57e9d2..9f3efe57e9d2 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-3-thumb.dat index a2adc418c4a5..a2adc418c4a5 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-pop-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-arm.dat index b2f6e0965ab9..b2f6e0965ab9 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-thumb.dat index 6f5b29ed1990..6f5b29ed1990 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-arm.dat index 6f1f4389e80e..6f1f4389e80e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-thumb.dat index 23e4df446bf4..23e4df446bf4 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-3-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-arm.dat index 06847a5ff3ba..06847a5ff3ba 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-3-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-thumb.dat index e3330f537cb6..e3330f537cb6 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-push-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-arm.dat index 70a5be3cb69c..70a5be3cb69c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-thumb.dat index 3559652ce6c1..3559652ce6c1 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-arm.dat index 3d77724b4f96..3d77724b4f96 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-thumb.dat index 73e8cd3e548e..73e8cd3e548e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-3-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-arm.dat index 97c90a0050c3..97c90a0050c3 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-3-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-thumb.dat index 8e891c042879..8e891c042879 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-4-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-arm.dat index ed3b54eaf38a..ed3b54eaf38a 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-4-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-4-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-thumb.dat index ec9e2dc1e549..ec9e2dc1e549 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-4-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-5-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-5-arm.dat index 98b8dfb16b37..98b8dfb16b37 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-str-5-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-5-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strb-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-1-arm.dat index 2f7320d007ad..2f7320d007ad 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strb-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strb-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-2-arm.dat index 495c8e720a11..495c8e720a11 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strb-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strbt-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strbt-1-arm.dat index 494c49af9527..494c49af9527 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strbt-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strbt-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strd-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strd-1-thumb.dat index 4876f8741b0e..4876f8741b0e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strd-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strd-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strt-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strt-1-arm.dat index 9fc311565eaa..9fc311565eaa 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-strt-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strt-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-arm.dat index 98c435d616a5..98c435d616a5 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-thumb.dat index 482480d0cd43..482480d0cd43 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-10-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-10-arm.dat index 9f07a947f7db..9f07a947f7db 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-10-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-10-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-2-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-arm.dat index 9a67268196e2..9a67268196e2 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-2-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-thumb.dat index 11d213803e2e..11d213803e2e 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-3-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-arm.dat index 4dfe680ce470..4dfe680ce470 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-3-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-thumb.dat index a017f5284302..a017f5284302 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-4-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-arm.dat index 50d13c994755..50d13c994755 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-4-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-4-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-thumb.dat index 214808d6a429..214808d6a429 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-4-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-5-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-arm.dat index 58de27b5d4e2..58de27b5d4e2 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-5-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-5-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-thumb.dat index 126882866859..126882866859 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-5-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-6-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-arm.dat index be6891307dbe..be6891307dbe 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-6-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-6-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-thumb.dat index d48c42eb8d8c..d48c42eb8d8c 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-6-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-8-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-8-arm.dat index 21b17dfbcd80..21b17dfbcd80 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-8-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-8-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-9-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-9-arm.dat index 06888ad3a4b7..06888ad3a4b7 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-sub-9-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-9-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-1-arm.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-arm.dat index 856a55749b18..856a55749b18 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-1-arm.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-arm.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-thumb.dat index 63aa7b8ed13f..63aa7b8ed13f 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-10-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-10-thumb.dat index 75938b4e1d5b..75938b4e1d5b 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-10-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-10-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-2-thumb.dat index 74bddcea97cb..74bddcea97cb 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-3-thumb.dat index 965ebf370176..965ebf370176 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-4-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-4-thumb.dat index 068724170d57..068724170d57 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-4-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-4-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-5-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-5-thumb.dat index 72ed2ef25c0f..72ed2ef25c0f 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-5-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-5-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-6-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-6-thumb.dat index 67133b2832e5..67133b2832e5 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-6-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-6-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-8-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-8-thumb.dat index 965ebf370176..965ebf370176 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-8-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-8-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-9-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-9-thumb.dat index ea1597743162..ea1597743162 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-subs-9-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-9-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpop-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-1-thumb.dat index 22dd9d88b4b6..22dd9d88b4b6 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpop-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpop-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-2-thumb.dat index e69cd9eef2d5..e69cd9eef2d5 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpop-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpop-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-3-thumb.dat index 375a92eaaab5..375a92eaaab5 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpop-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpush-1-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-1-thumb.dat index ac4ef56be665..ac4ef56be665 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpush-1-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-1-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpush-2-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-2-thumb.dat index 58055d6539ce..58055d6539ce 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpush-2-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-2-thumb.dat diff --git a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpush-3-thumb.dat b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-3-thumb.dat index 2658b43bc883..2658b43bc883 100644 --- a/packages/Python/lldbsuite/test/arm_emulation/new-test-files/test-vpush-3-thumb.dat +++ b/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-3-thumb.dat diff --git a/packages/Python/lldbsuite/test/decorators.py b/packages/Python/lldbsuite/test/decorators.py index 2a36ee4b3707..95455f715cdc 100644 --- a/packages/Python/lldbsuite/test/decorators.py +++ b/packages/Python/lldbsuite/test/decorators.py @@ -505,13 +505,6 @@ def skipIfRemote(func): return skipTestIfFn(is_remote)(func) -def skipIfRemoteDueToDeadlock(func): - """Decorate the item to skip tests if testing remotely due to the test deadlocking.""" - def is_remote(): - return "skip on remote platform (deadlocks)" if lldb.remote_platform else None - return skipTestIfFn(is_remote)(func) - - def skipIfNoSBHeaders(func): """Decorate the item to mark tests that should be skipped when LLDB is built with no SB API headers.""" def are_sb_headers_missing(): @@ -545,6 +538,23 @@ def skipIfiOSSimulator(func): return "skip on the iOS Simulator" if configuration.lldb_platform_name == 'ios-simulator' else None return skipTestIfFn(is_ios_simulator)(func) +def skipIfiOS(func): + return skipIfPlatform(["ios"])(func) + +def skipIftvOS(func): + return skipIfPlatform(["tvos"])(func) + +def skipIfwatchOS(func): + return skipIfPlatform(["watchos"])(func) + +def skipIfbridgeOS(func): + return skipIfPlatform(["bridgeos"])(func) + +def skipIfDarwinEmbedded(func): + """Decorate the item to skip tests that should be skipped on Darwin armv7/arm64 targets.""" + return skipIfPlatform( + lldbplatform.translate( + lldbplatform.darwin_embedded))(func) def skipIfFreeBSD(func): """Decorate the item to skip tests that should be skipped on FreeBSD.""" diff --git a/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py b/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py index 8c5fedf58abc..eb3b0bbf8851 100644 --- a/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py +++ b/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py @@ -30,8 +30,5 @@ class SequenceFunctionsTestCase(unittest.TestCase): for element in random.sample(self.seq, 5): self.assertTrue(element in self.seq) - def getCategories(self): - return [] - if __name__ == '__main__': unittest.main() diff --git a/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile b/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile index 7df664ac43e3..8a7102e347af 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 d4b82b3db276..9d4f3b7f1412 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 6645692f93ee..16736f798528 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 74991999d926..445979f5c701 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 7df664ac43e3..8a7102e347af 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 b99fb727e8a5..e6c9d43adf04 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 4464e2ee9f5c..b6592745356d 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 3dbb024b2809..9c79f850bf28 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 7146f227b98a..48eec5c5d268 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 137c40398870..dfe95a1a9fa7 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 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 <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 000000000000..af97678b2cf5 --- /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 diff --git a/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py b/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py index 867b6053a570..a4e3948e81ca 100644 --- a/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py +++ b/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py @@ -34,6 +34,7 @@ class AvoidsFdLeakTestCase(TestBase): # here. @skipIfWindows @skipIfTargetAndroid() # Android have some other file descriptors open by the shell + @skipIfDarwinEmbedded # <rdar://problem/33888742> # debugserver on ios has an extra fd open on launch def test_fd_leak_basic(self): self.do_test([]) @@ -45,6 +46,7 @@ class AvoidsFdLeakTestCase(TestBase): # here. @skipIfWindows @skipIfTargetAndroid() # Android have some other file descriptors open by the shell + @skipIfDarwinEmbedded # <rdar://problem/33888742> # debugserver on ios has an extra fd open on launch def test_fd_leak_log(self): self.do_test(["log enable -f '/dev/null' lldb commands"]) @@ -76,6 +78,7 @@ class AvoidsFdLeakTestCase(TestBase): # here. @skipIfWindows @skipIfTargetAndroid() # Android have some other file descriptors open by the shell + @skipIfDarwinEmbedded # <rdar://problem/33888742> # debugserver on ios has an extra fd open on launch def test_fd_leak_multitarget(self): self.build() exe = os.path.join(os.getcwd(), "a.out") diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile b/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile new file mode 100644 index 000000000000..6067ee45e984 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile @@ -0,0 +1,6 @@ +LEVEL = ../../../make + +C_SOURCES := main.c +CFLAGS_EXTRAS += -std=c99 + +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py b/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py new file mode 100644 index 000000000000..9630e39e0142 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py @@ -0,0 +1,104 @@ +""" +Test that the breakpoint auto-continue flag works correctly. +""" + +from __future__ import print_function + + +import os +import time +import re +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * + + +class BreakpointAutoContinue(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + NO_DEBUG_INFO_TESTCASE = True + + def test_breakpoint_auto_continue(self): + """Make sure the auto continue continues with no other complications""" + self.build() + self.simple_auto_continue() + + def test_auto_continue_with_command(self): + """Add a command, make sure the command gets run""" + self.build() + self.auto_continue_with_command() + + def test_auto_continue_on_location(self): + """Set auto-continue on a location and make sure only that location continues""" + self.build() + self.auto_continue_location() + + def make_target_and_bkpt(self, additional_options=None, num_expected_loc=1, + pattern="Set a breakpoint here"): + exe = os.path.join(os.getcwd(), "a.out") + self.target = self.dbg.CreateTarget(exe) + self.assertTrue(self.target.IsValid(), "Target is not valid") + + extra_options_txt = "--auto-continue 1 " + if additional_options: + extra_options_txt += additional_options + bpno = lldbutil.run_break_set_by_source_regexp(self, pattern, + extra_options = extra_options_txt, + num_expected_locations = num_expected_loc) + return bpno + + def launch_it (self, expected_state): + error = lldb.SBError() + launch_info = lldb.SBLaunchInfo(None) + launch_info.SetWorkingDirectory(self.get_process_working_directory()) + + process = self.target.Launch(launch_info, error) + self.assertTrue(error.Success(), "Launch failed.") + + state = process.GetState() + self.assertEqual(state, expected_state, "Didn't get expected state") + + return process + + def setUp(self): + # Call super's setUp(). + TestBase.setUp(self) + + def simple_auto_continue(self): + bpno = self.make_target_and_bkpt() + process = self.launch_it(lldb.eStateExited) + + bkpt = self.target.FindBreakpointByID(bpno) + self.assertEqual(bkpt.GetHitCount(), 2, "Should have run through the breakpoint twice") + + def auto_continue_with_command(self): + bpno = self.make_target_and_bkpt("-N BKPT -C 'break modify --auto-continue 0 BKPT'") + process = self.launch_it(lldb.eStateStopped) + state = process.GetState() + self.assertEqual(state, lldb.eStateStopped, "Process should be stopped") + bkpt = self.target.FindBreakpointByID(bpno) + threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt) + self.assertEqual(len(threads), 1, "There was a thread stopped at our breakpoint") + self.assertEqual(bkpt.GetHitCount(), 2, "Should have hit the breakpoint twice") + + def auto_continue_location(self): + bpno = self.make_target_and_bkpt(pattern="Set a[^ ]* breakpoint here", num_expected_loc=2) + bkpt = self.target.FindBreakpointByID(bpno) + bkpt.SetAutoContinue(False) + + loc = lldb.SBBreakpointLocation() + for i in range(0,2): + func_name = bkpt.location[i].GetAddress().function.name + if func_name == "main": + loc = bkpt.location[i] + + self.assertTrue(loc.IsValid(), "Didn't find a location in main") + loc.SetAutoContinue(True) + + process = self.launch_it(lldb.eStateStopped) + + threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt) + self.assertEqual(len(threads), 1, "Didn't get one thread stopped at our breakpoint") + func_name = threads[0].frame[0].function.name + self.assertEqual(func_name, "call_me") diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/main.c b/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/main.c new file mode 100644 index 000000000000..a37f05e0290a --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/main.c @@ -0,0 +1,19 @@ +#include <stdio.h> + +void +call_me() +{ + printf("Set another breakpoint here.\n"); +} + +int +main() +{ + int change_me = 0; + for (int i = 0; i < 2; i++) + { + printf ("Set a breakpoint here: %d with: %d.\n", i, change_me); + } + call_me(); + return 0; +} diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py index e67a6332d9d2..386eafbb0b60 100644 --- a/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py @@ -24,12 +24,21 @@ class BreakpointCommandTestCase(TestBase): cls.RemoveTempFile("output2.txt") @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528") - def test(self): + def test_breakpoint_command_sequence(self): """Test a sequence of breakpoint command add, list, and delete.""" self.build() self.breakpoint_command_sequence() + + @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528") + def test_script_parameters(self): + """Test a sequence of breakpoint command add, list, and delete.""" + self.build() self.breakpoint_command_script_parameters() + def test_commands_on_creation(self): + self.build() + self.breakpoint_commands_on_creation() + def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -268,3 +277,23 @@ class BreakpointCommandTestCase(TestBase): # Now remove 'output-2.txt' os.remove('output-2.txt') + + def breakpoint_commands_on_creation(self): + """Test that setting breakpoint commands when creating the breakpoint works""" + exe = os.path.join(os.getcwd(), "a.out") + target = self.dbg.CreateTarget(exe) + self.assertTrue(target.IsValid(), "Created an invalid target.") + + # Add a breakpoint. + lldbutil.run_break_set_by_file_and_line( + self, "main.c", self.line, num_expected_locations=1, loc_exact=True, + extra_options='-C bt -C "thread list" -C continue') + + bkpt = target.FindBreakpointByID(1) + self.assertTrue(bkpt.IsValid(), "Couldn't find breakpoint 1") + com_list = lldb.SBStringList() + bkpt.GetCommandLineCommands(com_list) + self.assertEqual(com_list.GetSize(), 3, "Got the wrong number of commands") + self.assertEqual(com_list.GetStringAtIndex(0), "bt", "First bt") + self.assertEqual(com_list.GetStringAtIndex(1), "thread list", "Next thread list") + self.assertEqual(com_list.GetStringAtIndex(2), "continue", "Last continue") diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile new file mode 100644 index 000000000000..314f1cb2f077 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile @@ -0,0 +1,5 @@ +LEVEL = ../../../make + +CXX_SOURCES := main.cpp + +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py new file mode 100644 index 000000000000..5d7b6f9169ad --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py @@ -0,0 +1,109 @@ +""" +Test breakpoint hit count features. +""" + +from __future__ import print_function + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class BreakpointHitCountTestCase(TestBase): + + NO_DEBUG_INFO_TESTCASE = True + + mydir = TestBase.compute_mydir(__file__) + + @add_test_categories(['pyapi']) + def test_breakpoint_location_hit_count(self): + """Use Python APIs to check breakpoint hit count.""" + self.build() + self.do_test_breakpoint_location_hit_count() + + def setUp(self): + # Call super's setUp(). + TestBase.setUp(self) + self.a_int_body_line_no = line_number( + 'main.cpp', '// Breakpoint Location 1') + self.a_float_body_line_no = line_number( + 'main.cpp', '// Breakpoint Location 2') + + def do_test_breakpoint_location_hit_count(self): + """Use Python APIs to check breakpoint hit count.""" + exe = os.path.join(os.getcwd(), "a.out") + + target = self.dbg.CreateTarget(exe) + self.assertTrue(target, VALID_TARGET) + + # Create a breakpoint in main.cpp by name 'a', + # there should be two locations. + breakpoint = target.BreakpointCreateByName('a', 'a.out') + self.assertTrue(breakpoint and + breakpoint.GetNumLocations() == 2, + VALID_BREAKPOINT) + + # Verify all breakpoint locations are enabled. + location1 = breakpoint.GetLocationAtIndex(0) + self.assertTrue(location1 and + location1.IsEnabled(), + VALID_BREAKPOINT_LOCATION) + + location2 = breakpoint.GetLocationAtIndex(1) + self.assertTrue(location2 and + location2.IsEnabled(), + VALID_BREAKPOINT_LOCATION) + + # Launch the process, and do not stop at entry point. + process = target.LaunchSimple( + None, None, self.get_process_working_directory()) + self.assertTrue(process, PROCESS_IS_VALID) + + # Verify 1st breakpoint location is hit. + from lldbsuite.test.lldbutil import get_stopped_thread + thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) + self.assertTrue( + thread.IsValid(), + "There should be a thread stopped due to breakpoint") + + frame0 = thread.GetFrameAtIndex(0) + location1 = breakpoint.FindLocationByAddress(frame0.GetPC()) + self.assertTrue( + frame0.GetLineEntry().GetLine() == self.a_int_body_line_no, + "Stopped in int a(int)") + self.assertTrue(location1) + self.assertEqual(location1.GetHitCount(), 1) + self.assertEqual(breakpoint.GetHitCount(), 1) + + process.Continue() + + # Verify 2nd breakpoint location is hit. + thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) + self.assertTrue( + thread.IsValid(), + "There should be a thread stopped due to breakpoint") + + frame0 = thread.GetFrameAtIndex(0) + location2 = breakpoint.FindLocationByAddress(frame0.GetPC()) + self.assertTrue( + frame0.GetLineEntry().GetLine() == self.a_float_body_line_no, + "Stopped in float a(float)") + self.assertTrue(location2) + self.assertEqual(location2.GetHitCount(), 1) + self.assertEqual(location1.GetHitCount(), 1) + self.assertEqual(breakpoint.GetHitCount(), 2) + + process.Continue() + + # Verify 2nd breakpoint location is hit again. + thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) + self.assertTrue( + thread.IsValid(), + "There should be a thread stopped due to breakpoint") + + self.assertEqual(location2.GetHitCount(), 2) + self.assertEqual(location1.GetHitCount(), 1) + self.assertEqual(breakpoint.GetHitCount(), 3) + + process.Continue() diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/main.cpp b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/main.cpp new file mode 100644 index 000000000000..333e9b6405a7 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/main.cpp @@ -0,0 +1,27 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +int a(int val) +{ + return val; // Breakpoint Location 1 +} + +float a(float val) +{ + return val; // Breakpoint Location 2 +} + +int main (int argc, char const *argv[]) +{ + int A1 = a(1); + float A2 = a(2.0f); + float A3 = a(3.0f); + + return 0; +} diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py index fdbd622f767b..de24d8b002d7 100644 --- a/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py @@ -18,27 +18,40 @@ class BreakpointLocationsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528") - def test(self): + def test_enable(self): """Test breakpoint enable/disable for a breakpoint ID with multiple locations.""" self.build() self.breakpoint_locations_test() + def test_shadowed_cond_options(self): + """Test that options set on the breakpoint and location behave correctly.""" + self.build() + self.shadowed_bkpt_cond_test() + + + def test_shadowed_command_options(self): + """Test that options set on the breakpoint and location behave correctly.""" + self.build() + self.shadowed_bkpt_command_test() + def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number('main.c', '// Set break point at this line.') - def breakpoint_locations_test(self): - """Test breakpoint enable/disable for a breakpoint ID with multiple locations.""" + def set_breakpoint (self): exe = os.path.join(os.getcwd(), "a.out") - self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) + target = self.dbg.CreateTarget(exe) + self.assertTrue(target, "Target %s is not valid"%(exe)) # This should create a breakpoint with 3 locations. - lldbutil.run_break_set_by_file_and_line( - self, "main.c", self.line, num_expected_locations=3) + + bkpt = target.BreakpointCreateByLocation("main.c", self.line) # The breakpoint list should show 3 locations. + self.assertEqual(bkpt.GetNumLocations(), 3, "Wrong number of locations") + self.expect( "breakpoint list -f", "Breakpoint locations shown correctly", @@ -49,6 +62,87 @@ class BreakpointLocationsTestCase(TestBase): "where = a.out`func_inlined .+unresolved, hit count = 0", "where = a.out`main .+\[inlined\].+unresolved, hit count = 0"]) + return bkpt + + def shadowed_bkpt_cond_test(self): + """Test that options set on the breakpoint and location behave correctly.""" + # Breakpoint option propagation from bkpt to loc used to be done the first time + # a breakpoint location option was specifically set. After that the other options + # on that location would stop tracking the breakpoint. That got fixed, and this test + # makes sure only the option touched is affected. + + bkpt = self.set_breakpoint() + bkpt_cond = "1 == 0" + bkpt.SetCondition(bkpt_cond) + self.assertEqual(bkpt.GetCondition(), bkpt_cond,"Successfully set condition") + self.assertTrue(bkpt.location[0].GetCondition() == bkpt.GetCondition(), "Conditions are the same") + + # Now set a condition on the locations, make sure that this doesn't effect the bkpt: + bkpt_loc_1_cond = "1 == 1" + bkpt.location[0].SetCondition(bkpt_loc_1_cond) + self.assertEqual(bkpt.location[0].GetCondition(), bkpt_loc_1_cond, "Successfully changed location condition") + self.assertNotEqual(bkpt.GetCondition(), bkpt_loc_1_cond, "Changed location changed Breakpoint condition") + self.assertEqual(bkpt.location[1].GetCondition(), bkpt_cond, "Changed another location's condition") + + # Now make sure that setting one options doesn't fix the value of another: + bkpt.SetIgnoreCount(10) + self.assertEqual(bkpt.GetIgnoreCount(), 10, "Set the ignore count successfully") + self.assertEqual(bkpt.location[0].GetIgnoreCount(), 10, "Location doesn't track top-level bkpt.") + + # Now make sure resetting the condition to "" resets the tracking: + bkpt.location[0].SetCondition("") + bkpt_new_cond = "1 == 3" + bkpt.SetCondition(bkpt_new_cond) + self.assertEqual(bkpt.location[0].GetCondition(), bkpt_new_cond, "Didn't go back to tracking condition") + + def shadowed_bkpt_command_test(self): + """Test that options set on the breakpoint and location behave correctly.""" + # Breakpoint option propagation from bkpt to loc used to be done the first time + # a breakpoint location option was specifically set. After that the other options + # on that location would stop tracking the breakpoint. That got fixed, and this test + # makes sure only the option touched is affected. + + bkpt = self.set_breakpoint() + commands = ["AAAAAA", "BBBBBB", "CCCCCC"] + str_list = lldb.SBStringList() + str_list.AppendList(commands, len(commands)) + + bkpt.SetCommandLineCommands(str_list) + cmd_list = lldb.SBStringList() + bkpt.GetCommandLineCommands(cmd_list) + list_size = str_list.GetSize() + self.assertEqual(cmd_list.GetSize() , list_size, "Added the right number of commands") + for i in range(0,list_size): + self.assertEqual(str_list.GetStringAtIndex(i), cmd_list.GetStringAtIndex(i), "Mismatched commands.") + + commands = ["DDDDDD", "EEEEEE", "FFFFFF", "GGGGGG"] + loc_list = lldb.SBStringList() + loc_list.AppendList(commands, len(commands)) + bkpt.location[1].SetCommandLineCommands(loc_list) + loc_cmd_list = lldb.SBStringList() + bkpt.location[1].GetCommandLineCommands(loc_cmd_list) + + loc_list_size = loc_list.GetSize() + + # Check that the location has the right commands: + self.assertEqual(loc_cmd_list.GetSize() , loc_list_size, "Added the right number of commands to location") + for i in range(0,loc_list_size): + self.assertEqual(loc_list.GetStringAtIndex(i), loc_cmd_list.GetStringAtIndex(i), "Mismatched commands.") + + # Check that we didn't mess up the breakpoint level commands: + self.assertEqual(cmd_list.GetSize() , list_size, "Added the right number of commands") + for i in range(0,list_size): + self.assertEqual(str_list.GetStringAtIndex(i), cmd_list.GetStringAtIndex(i), "Mismatched commands.") + + # And check we didn't mess up another location: + untouched_loc_cmds = lldb.SBStringList() + bkpt.location[0].GetCommandLineCommands(untouched_loc_cmds) + self.assertEqual(untouched_loc_cmds.GetSize() , 0, "Changed the wrong location") + + def breakpoint_locations_test(self): + """Test breakpoint enable/disable for a breakpoint ID with multiple locations.""" + self.set_breakpoint() + # The 'breakpoint disable 3.*' command should fail gracefully. self.expect("breakpoint disable 3.*", "Disabling an invalid breakpoint should fail gracefully", @@ -80,7 +174,7 @@ class BreakpointLocationsTestCase(TestBase): "1 breakpoint locatons disabled correctly", startstr="1 breakpoints disabled.") - # Run the program againt. We should stop on the two breakpoint + # Run the program again. We should stop on the two breakpoint # locations. self.runCmd("run", RUN_SUCCEEDED) diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py index cc31ef80e8a3..b95d2cea550a 100644 --- a/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py @@ -17,6 +17,7 @@ from lldbsuite.test import lldbutil class BreakpointNames(TestBase): mydir = TestBase.compute_mydir(__file__) + NO_DEBUG_INFO_TESTCASE = True @add_test_categories(['pyapi']) def test_setting_names(self): @@ -37,6 +38,25 @@ class BreakpointNames(TestBase): self.setup_target() self.do_check_using_names() + def test_configuring_names(self): + """Use Python APIs to test that configuring options on breakpoint names works correctly.""" + self.build() + self.make_a_dummy_name() + self.setup_target() + self.do_check_configuring_names() + + def test_configuring_permissions_sb(self): + """Use Python APIs to test that configuring permissions on names works correctly.""" + self.build() + self.setup_target() + self.do_check_configuring_permissions_sb() + + def test_configuring_permissions_cli(self): + """Use Python APIs to test that configuring permissions on names works correctly.""" + self.build() + self.setup_target() + self.do_check_configuring_permissions_cli() + def setup_target(self): exe = os.path.join(os.getcwd(), "a.out") @@ -45,10 +65,36 @@ class BreakpointNames(TestBase): self.assertTrue(self.target, VALID_TARGET) self.main_file_spec = lldb.SBFileSpec(os.path.join(os.getcwd(), "main.c")) + def check_name_in_target(self, bkpt_name): + name_list = lldb.SBStringList() + self.target.GetBreakpointNames(name_list) + found_it = False + for name in name_list: + if name == bkpt_name: + found_it = True + break + self.assertTrue(found_it, "Didn't find the name %s in the target's name list:"%(bkpt_name)) + def setUp(self): # Call super's setUp(). TestBase.setUp(self) + # These are the settings we're going to be putting into names & breakpoints: + self.bp_name_string = "ABreakpoint" + self.is_one_shot = True + self.ignore_count = 1000 + self.condition = "1 == 2" + self.auto_continue = True + self.tid = 0xaaaa + self.tidx = 10 + self.thread_name = "Fooey" + self.queue_name = "Blooey" + self.cmd_list = lldb.SBStringList() + self.cmd_list.AppendString("frame var") + self.cmd_list.AppendString("bt") + self.help_string = "I do something interesting" + + def do_check_names(self): """Use Python APIs to check that we can set & retrieve breakpoint names""" bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10) @@ -66,11 +112,15 @@ class BreakpointNames(TestBase): matches = bkpt.MatchesName("NotABreakpoint") self.assertTrue(not matches, "We matched a name we didn't set.") + # Make sure the name is also in the target: + self.check_name_in_target(bkpt_name) + # Add another name, make sure that works too: bkpt.AddName(other_bkpt_name) matches = bkpt.MatchesName(bkpt_name) self.assertTrue(matches, "Adding a name means we didn't match the name we just set") + self.check_name_in_target(other_bkpt_name) # Remove the name and make sure we no longer match it: bkpt.RemoveName(bkpt_name) @@ -89,26 +139,21 @@ class BreakpointNames(TestBase): def do_check_illegal_names(self): """Use Python APIs to check that we reject illegal names.""" bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10) - success = bkpt.AddName("-CantStartWithADash") - self.assertTrue(not success,"We allowed a name starting with a dash.") - - success = bkpt.AddName("1CantStartWithANumber") - self.assertTrue(not success, "We allowed a name starting with a number.") - - success = bkpt.AddName("^CantStartWithNonAlpha") - self.assertTrue(not success, "We allowed a name starting with an ^.") + bad_names = ["-CantStartWithADash", + "1CantStartWithANumber", + "^CantStartWithNonAlpha", + "CantHave-ADash", + "Cant Have Spaces"] + for bad_name in bad_names: + success = bkpt.AddName(bad_name) + self.assertTrue(not success,"We allowed an illegal name: %s"%(bad_name)) + bp_name = lldb.SBBreakpointName(self.target, bad_name) + self.assertFalse(bp_name.IsValid(), "We made a breakpoint name with an illegal name: %s"%(bad_name)); - success = bkpt.AddName("CantHave-ADash") - self.assertTrue(not success, "We allowed a name with a dash in it.") + retval =lldb.SBCommandReturnObject() + self.dbg.GetCommandInterpreter().HandleCommand("break set -n whatever -N '%s'"%(bad_name), retval) + self.assertTrue(not retval.Succeeded(), "break set succeeded with: illegal name: %s"%(bad_name)) - success = bkpt.AddName("Cant Have Spaces") - self.assertTrue(not success, "We allowed a name with spaces.") - - # Check from the command line as well: - retval =lldb.SBCommandReturnObject() - self.dbg.GetCommandInterpreter().HandleCommand("break set -n whatever -N has-dashes", retval) - self.assertTrue(not retval.Succeeded(), "break set succeeded with: illegal name") - def do_check_using_names(self): """Use Python APIs to check names work in place of breakpoint ID's.""" @@ -133,9 +178,190 @@ class BreakpointNames(TestBase): self.assertTrue(not bkpt.IsEnabled(), "We didn't disable the breakpoint.") # Also make sure we don't apply commands to non-matching names: - self.dbg.GetCommandInterpreter().HandleCommand("break modify --one-shot 1 %s"%(bkpt_name), retval) + self.dbg.GetCommandInterpreter().HandleCommand("break modify --one-shot 1 %s"%(other_bkpt_name), retval) self.assertTrue(retval.Succeeded(), "break modify failed with: %s."%(retval.GetError())) self.assertTrue(not bkpt.IsOneShot(), "We applied one-shot to the wrong breakpoint.") + def check_option_values(self, bp_object): + self.assertEqual(bp_object.IsOneShot(), self.is_one_shot, "IsOneShot") + self.assertEqual(bp_object.GetIgnoreCount(), self.ignore_count, "IgnoreCount") + self.assertEqual(bp_object.GetCondition(), self.condition, "Condition") + self.assertEqual(bp_object.GetAutoContinue(), self.auto_continue, "AutoContinue") + self.assertEqual(bp_object.GetThreadID(), self.tid, "Thread ID") + self.assertEqual(bp_object.GetThreadIndex(), self.tidx, "Thread Index") + self.assertEqual(bp_object.GetThreadName(), self.thread_name, "Thread Name") + self.assertEqual(bp_object.GetQueueName(), self.queue_name, "Queue Name") + set_cmds = lldb.SBStringList() + bp_object.GetCommandLineCommands(set_cmds) + self.assertEqual(set_cmds.GetSize(), self.cmd_list.GetSize(), "Size of command line commands") + for idx in range(0, set_cmds.GetSize()): + self.assertEqual(self.cmd_list.GetStringAtIndex(idx), set_cmds.GetStringAtIndex(idx), "Command %d"%(idx)) + + def make_a_dummy_name(self): + "This makes a breakpoint name in the dummy target to make sure it gets copied over" + + dummy_target = self.dbg.GetDummyTarget() + self.assertTrue(dummy_target.IsValid(), "Dummy target was not valid.") + + def cleanup (): + self.dbg.GetDummyTarget().DeleteBreakpointName(self.bp_name_string) + + # Execute the cleanup function during test case tear down. + self.addTearDownHook(cleanup) + + # Now find it in the dummy target, and make sure these settings took: + bp_name = lldb.SBBreakpointName(dummy_target, self.bp_name_string) + # Make sure the name is right: + self.assertTrue (bp_name.GetName() == self.bp_name_string, "Wrong bp_name: %s"%(bp_name.GetName())) + bp_name.SetOneShot(self.is_one_shot) + bp_name.SetIgnoreCount(self.ignore_count) + bp_name.SetCondition(self.condition) + bp_name.SetAutoContinue(self.auto_continue) + bp_name.SetThreadID(self.tid) + bp_name.SetThreadIndex(self.tidx) + bp_name.SetThreadName(self.thread_name) + bp_name.SetQueueName(self.queue_name) + bp_name.SetCommandLineCommands(self.cmd_list) + + # Now look it up again, and make sure it got set correctly. + bp_name = lldb.SBBreakpointName(dummy_target, self.bp_name_string) + self.assertTrue(bp_name.IsValid(), "Failed to make breakpoint name.") + self.check_option_values(bp_name) + + def do_check_configuring_names(self): + """Use Python APIs to check that configuring breakpoint names works correctly.""" + other_bp_name_string = "AnotherBreakpointName" + cl_bp_name_string = "CLBreakpointName" + + # Now find the version copied in from the dummy target, and make sure these settings took: + bp_name = lldb.SBBreakpointName(self.target, self.bp_name_string) + self.assertTrue(bp_name.IsValid(), "Failed to make breakpoint name.") + self.check_option_values(bp_name) + + # Now add this name to a breakpoint, and make sure it gets configured properly + bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10) + success = bkpt.AddName(self.bp_name_string) + self.assertTrue(success, "Couldn't add this name to the breakpoint") + self.check_option_values(bkpt) + + # Now make a name from this breakpoint, and make sure the new name is properly configured: + new_name = lldb.SBBreakpointName(bkpt, other_bp_name_string) + self.assertTrue(new_name.IsValid(), "Couldn't make a valid bp_name from a breakpoint.") + self.check_option_values(bkpt) + + # Now change the name's option and make sure it gets propagated to + # the breakpoint: + new_auto_continue = not self.auto_continue + bp_name.SetAutoContinue(new_auto_continue) + self.assertEqual(bp_name.GetAutoContinue(), new_auto_continue, "Couldn't change auto-continue on the name") + self.assertEqual(bkpt.GetAutoContinue(), new_auto_continue, "Option didn't propagate to the breakpoint.") + # Now make this same breakpoint name - but from the command line + cmd_str = "breakpoint name configure %s -o %d -i %d -c '%s' -G %d -t %d -x %d -T '%s' -q '%s' -H '%s'"%(cl_bp_name_string, + self.is_one_shot, + self.ignore_count, + self.condition, + self.auto_continue, + self.tid, + self.tidx, + self.thread_name, + self.queue_name, + self.help_string) + for cmd in self.cmd_list: + cmd_str += " -C '%s'"%(cmd) + + self.runCmd(cmd_str, check=True) + # Now look up this name again and check its options: + cl_name = lldb.SBBreakpointName(self.target, cl_bp_name_string) + self.check_option_values(cl_name) + # Also check the help string: + self.assertEqual(self.help_string, cl_name.GetHelpString(), "Help string didn't match") + # Change the name and make sure that works: + new_help = "I do something even more interesting" + cl_name.SetHelpString(new_help) + self.assertEqual(new_help, cl_name.GetHelpString(), "SetHelpString didn't") + + # We should have three names now, make sure the target can list them: + name_list = lldb.SBStringList() + self.target.GetBreakpointNames(name_list) + for name_string in [self.bp_name_string, other_bp_name_string, cl_bp_name_string]: + self.assertTrue(name_string in name_list, "Didn't find %s in names"%(name_string)) + + # Delete the name from the current target. Make sure that works and deletes the + # name from the breakpoint as well: + self.target.DeleteBreakpointName(self.bp_name_string) + name_list.Clear() + self.target.GetBreakpointNames(name_list) + self.assertTrue(self.bp_name_string not in name_list, "Didn't delete %s from a real target"%(self.bp_name_string)) + # Also make sure the name got removed from breakpoints holding it: + self.assertFalse(bkpt.MatchesName(self.bp_name_string), "Didn't remove the name from the breakpoint.") + + # Test that deleting the name we injected into the dummy target works (there's also a + # cleanup that will do this, but that won't test the result... + dummy_target = self.dbg.GetDummyTarget() + dummy_target.DeleteBreakpointName(self.bp_name_string) + name_list.Clear() + dummy_target.GetBreakpointNames(name_list) + self.assertTrue(self.bp_name_string not in name_list, "Didn't delete %s from the dummy target"%(self.bp_name_string)) + # Also make sure the name got removed from breakpoints holding it: + self.assertFalse(bkpt.MatchesName(self.bp_name_string), "Didn't remove the name from the breakpoint.") + def check_permission_results(self, bp_name): + self.assertEqual(bp_name.GetAllowDelete(), False, "Didn't set allow delete.") + protected_bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10) + protected_id = protected_bkpt.GetID() + + unprotected_bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10) + unprotected_id = unprotected_bkpt.GetID() + + success = protected_bkpt.AddName(self.bp_name_string) + self.assertTrue(success, "Couldn't add this name to the breakpoint") + + self.target.DisableAllBreakpoints() + self.assertEqual(protected_bkpt.IsEnabled(), True, "Didnt' keep breakpoint from being disabled") + self.assertEqual(unprotected_bkpt.IsEnabled(), False, "Protected too many breakpoints from disabling.") + + # Try from the command line too: + unprotected_bkpt.SetEnabled(True) + result = lldb.SBCommandReturnObject() + self.dbg.GetCommandInterpreter().HandleCommand("break disable", result) + self.assertTrue(result.Succeeded()) + self.assertEqual(protected_bkpt.IsEnabled(), True, "Didnt' keep breakpoint from being disabled") + self.assertEqual(unprotected_bkpt.IsEnabled(), False, "Protected too many breakpoints from disabling.") + + self.target.DeleteAllBreakpoints() + bkpt = self.target.FindBreakpointByID(protected_id) + self.assertTrue(bkpt.IsValid(), "Didn't keep the breakpoint from being deleted.") + bkpt = self.target.FindBreakpointByID(unprotected_id) + self.assertFalse(bkpt.IsValid(), "Protected too many breakpoints from deletion.") + + # Remake the unprotected breakpoint and try again from the command line: + unprotected_bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10) + unprotected_id = unprotected_bkpt.GetID() + + self.dbg.GetCommandInterpreter().HandleCommand("break delete -f", result) + self.assertTrue(result.Succeeded()) + bkpt = self.target.FindBreakpointByID(protected_id) + self.assertTrue(bkpt.IsValid(), "Didn't keep the breakpoint from being deleted.") + bkpt = self.target.FindBreakpointByID(unprotected_id) + self.assertFalse(bkpt.IsValid(), "Protected too many breakpoints from deletion.") + + def do_check_configuring_permissions_sb(self): + bp_name = lldb.SBBreakpointName(self.target, self.bp_name_string) + + # Make a breakpoint name with delete disallowed: + bp_name = lldb.SBBreakpointName(self.target, self.bp_name_string) + self.assertTrue(bp_name.IsValid(), "Failed to make breakpoint name for valid name.") + + bp_name.SetAllowDelete(False) + bp_name.SetAllowDisable(False) + bp_name.SetAllowList(False) + self.check_permission_results(bp_name) + + def do_check_configuring_permissions_cli(self): + # Make the name with the right options using the command line: + self.runCmd("breakpoint name configure -L 0 -D 0 -A 0 %s"%(self.bp_name_string), check=True) + # Now look up the breakpoint we made, and check that it works. + bp_name = lldb.SBBreakpointName(self.target, self.bp_name_string) + self.assertTrue(bp_name.IsValid(), "Didn't make a breakpoint name we could find.") + self.check_permission_results(bp_name) diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile new file mode 100644 index 000000000000..801c1041bbe1 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile @@ -0,0 +1,8 @@ +LEVEL = ../../../make + +DYLIB_NAME := foo +DYLIB_CXX_SOURCES := foo.cpp +CXX_SOURCES := main.cpp +CFLAGS_EXTRAS := -fPIC + +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py new file mode 100644 index 000000000000..4dfa03d5fab4 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py @@ -0,0 +1,46 @@ +""" +Test that we can hit breakpoints in global constructors +""" + +from __future__ import print_function + + +import os +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestBreakpointInGlobalConstructors(TestBase): + + mydir = TestBase.compute_mydir(__file__) + NO_DEBUG_INFO_TESTCASE = True + + def setUp(self): + TestBase.setUp(self) + self.line_foo = line_number('foo.cpp', '// !BR_foo') + self.line_main = line_number('main.cpp', '// !BR_main') + + @expectedFailureAll(bugnumber="llvm.org/pr35480", oslist=["linux"]) + def test(self): + self.build() + exe = os.path.join(os.getcwd(), "a.out") + self.runCmd("file %s" % exe) + + bp_main = lldbutil.run_break_set_by_file_and_line( + self, 'main.cpp', self.line_main) + bp_foo = lldbutil.run_break_set_by_file_and_line( + self, 'foo.cpp', self.line_foo) + + self.runCmd("run") + + self.assertIsNotNone( + lldbutil.get_one_thread_stopped_at_breakpoint_id( + self.process(), bp_foo)) + + self.runCmd("continue") + + self.assertIsNotNone( + lldbutil.get_one_thread_stopped_at_breakpoint_id( + self.process(), bp_main)) diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.cpp b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.cpp new file mode 100644 index 000000000000..f959a295467f --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.cpp @@ -0,0 +1,7 @@ +#include "foo.h" + +Foo::Foo() : x(42) { + bool some_code = x == 42; // !BR_foo +} + +Foo FooObj; diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.h b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.h new file mode 100644 index 000000000000..3bc63fed7555 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.h @@ -0,0 +1,11 @@ +#ifndef FOO_H +#define FOO_H + +struct LLDB_TEST_API Foo { + Foo(); + int x; +}; + +extern LLDB_TEST_API Foo FooObj; + +#endif diff --git a/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/main.cpp b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/main.cpp new file mode 100644 index 000000000000..d1c8038dfadb --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/main.cpp @@ -0,0 +1,14 @@ +#include "foo.h" + +struct Main { + Main(); + int x; +}; + +Main::Main() : x(47) { + bool some_code = x == 47; // !BR_main +} + +Main MainObj; + +int main() { return MainObj.x + FooObj.x; } diff --git a/packages/Python/lldbsuite/test/functionalities/command_source/.lldb b/packages/Python/lldbsuite/test/functionalities/command_source/.lldb index c544523832e7..ecbdcff44626 100644 --- a/packages/Python/lldbsuite/test/functionalities/command_source/.lldb +++ b/packages/Python/lldbsuite/test/functionalities/command_source/.lldb @@ -1 +1,2 @@ -script import my +# one more level of indirection to stress the command interpreter reentrancy +command source commands.txt diff --git a/packages/Python/lldbsuite/test/functionalities/command_source/commands.txt b/packages/Python/lldbsuite/test/functionalities/command_source/commands.txt new file mode 100644 index 000000000000..8e4de66d4690 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/command_source/commands.txt @@ -0,0 +1,2 @@ +script import my +p 1 + 1 diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py index 0459058f3ae9..410da702b93d 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py @@ -54,7 +54,7 @@ class DataFormatterBoolRefPtr(TestBase): # Execute the cleanup function during test case tear down. self.addTearDownHook(cleanup) - isiOS = (lldbplatformutil.getPlatform() == 'ios') + isiOS = (lldbplatformutil.getPlatform() == 'ios' or lldbplatformutil.getPlatform() == 'watchos') # Now check that we use the right summary for BOOL& self.expect('frame variable yes_ref', diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py index 2d66a941ed34..750e29460732 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py @@ -46,6 +46,7 @@ class NSIndexPathDataFormatterTestCase(TestBase): @skipUnlessDarwin @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656605") + @expectedFailureAll(archs=['armv7', 'armv7k'], bugnumber="rdar://problem/34561607") # NSIndexPath formatter isn't working for 32-bit arm def test_nsindexpath_with_run_command(self): """Test formatters for NSIndexPath.""" self.appkit_tester_impl(self.nsindexpath_data_formatter_commands) diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile index a92cffcc319b..637404f1bd0a 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile @@ -1,14 +1,7 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp -USE_LIBSTDCPP := 1 - -# 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 +USE_LIBSTDCPP := 0 include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py index 5b52277e8b7a..b0b45cb831b0 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py @@ -172,23 +172,6 @@ class SkipSummaryDataFormatterTestCase(TestBase): 'm_child2 = {', 'm_some_text = "Just a test"']) - # Expand within a standard string (might depend on the implementation - # of the C++ stdlib you use) - self.expect( - 'frame variable data1.m_child1->m_child2.m_child1.m_child2 --no-summary-depth=2', - substrs=[ - '(DeepData_5) data1.m_child1->m_child2.m_child1.m_child2 = {', - 'm_some_text = {', - '_M_dataplus = (_M_p = "Just a test")']) - - # Repeat the above, but only skip 1 level of summaries - self.expect( - 'frame variable data1.m_child1->m_child2.m_child1.m_child2 --no-summary-depth=1', - substrs=[ - '(DeepData_5) data1.m_child1->m_child2.m_child1.m_child2 = {', - 'm_some_text = "Just a test"', - '}']) - # Change summary and expand, first without --no-summary-depth then with # --no-summary-depth self.runCmd( diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile new file mode 100644 index 000000000000..bf75013f531d --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile @@ -0,0 +1,6 @@ +LEVEL = ../../../../../make + +CXX_SOURCES := main.cpp + +USE_LIBCPP := 1 +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py new file mode 100644 index 000000000000..73a1b4e16bf6 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py @@ -0,0 +1,46 @@ +""" +Test lldb data formatter subsystem. +""" + +from __future__ import print_function + + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestDataFormatterLibcxxBitset(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + def setUp(self): + TestBase.setUp(self) + + primes = [1]*300 + primes[0] = primes[1] = 0 + for i in range(2, len(primes)): + for j in range(2*i, len(primes), i): + primes[j] = 0 + self.primes = primes + + def check(self, name, size): + var = self.frame().FindVariable(name) + self.assertTrue(var.IsValid()) + self.assertEqual(var.GetNumChildren(), size) + for i in range(size): + child = var.GetChildAtIndex(i) + self.assertEqual(child.GetValueAsUnsigned(), self.primes[i], + "variable: %s, index: %d"%(name, size)) + + @add_test_categories(["libc++"]) + def test(self): + """Test that std::bitset is displayed correctly""" + self.build() + lldbutil.run_to_source_breakpoint(self, '// break here', + lldb.SBFileSpec("main.cpp", False)) + + self.check("empty", 0) + self.check("small", 13) + self.check("large", 200) diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/main.cpp b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/main.cpp new file mode 100644 index 000000000000..a80f97b80157 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/main.cpp @@ -0,0 +1,20 @@ +#include <bitset> + +template<std::size_t N> +void fill(std::bitset<N> &b) { + b.set(); + b[0] = b[1] = false; + for (std::size_t i = 2; i < N; ++i) { + for (std::size_t j = 2*i; j < N; j+=i) + b[j] = false; + } +} + +int main() { + std::bitset<0> empty; + std::bitset<13> small; + fill(small); + std::bitset<200> large; + fill(large); + return 0; // break here +} diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile new file mode 100644 index 000000000000..bf75013f531d --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile @@ -0,0 +1,6 @@ +LEVEL = ../../../../../make + +CXX_SOURCES := main.cpp + +USE_LIBCPP := 1 +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py new file mode 100644 index 000000000000..1cc454a473a8 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py @@ -0,0 +1,53 @@ +""" +Test lldb data formatter subsystem. +""" + +from __future__ import print_function + + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestDataFormatterLibcxxForwardList(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + def setUp(self): + TestBase.setUp(self) + self.line = line_number('main.cpp', '// break here') + ns = 'ndk' if lldbplatformutil.target_is_android() else '' + self.namespace = 'std::__' + ns + '1' + + @add_test_categories(["libc++"]) + def test(self): + """Test that std::forward_list is displayed correctly""" + self.build() + lldbutil.run_to_source_breakpoint(self, '// break here', + lldb.SBFileSpec("main.cpp", False)) + + forward_list = self.namespace + '::forward_list' + self.expect("frame variable empty", + substrs=[forward_list, + 'size=0', + '{}']) + + self.expect("frame variable one_elt", + substrs=[forward_list, + 'size=1', + '{', + '[0] = 47', + '}']) + + self.expect("frame variable five_elts", + substrs=[forward_list, + 'size=5', + '{', + '[0] = 1', + '[1] = 22', + '[2] = 333', + '[3] = 4444', + '[4] = 55555', + '}']) diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/main.cpp b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/main.cpp new file mode 100644 index 000000000000..73abda6e82e5 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/main.cpp @@ -0,0 +1,7 @@ +#include <forward_list> + +int main() +{ + std::forward_list<int> empty{}, one_elt{47}, five_elts{1,22,333,4444,55555}; + return 0; // break here +} diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile new file mode 100644 index 000000000000..bf75013f531d --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile @@ -0,0 +1,6 @@ +LEVEL = ../../../../../make + +CXX_SOURCES := main.cpp + +USE_LIBCPP := 1 +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py new file mode 100644 index 000000000000..2b157f7f6fcc --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py @@ -0,0 +1,43 @@ +""" +Test lldb data formatter subsystem. +""" + +from __future__ import print_function + + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestDataFormatterLibcxxQueue(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + def setUp(self): + TestBase.setUp(self) + ns = 'ndk' if lldbplatformutil.target_is_android() else '' + self.namespace = 'std::__' + ns + '1' + + def check_variable(self, name): + var = self.frame().FindVariable(name) + self.assertTrue(var.IsValid()) + + queue = self.namespace + '::queue' + self.assertTrue(queue in var.GetTypeName()) + self.assertEqual(var.GetNumChildren(), 5) + for i in range(5): + ch = var.GetChildAtIndex(i) + self.assertTrue(ch.IsValid()) + self.assertEqual(ch.GetValueAsSigned(), i+1) + + @add_test_categories(["libc++"]) + def test(self): + """Test that std::queue is displayed correctly""" + self.build() + lldbutil.run_to_source_breakpoint(self, '// break here', + lldb.SBFileSpec("main.cpp", False)) + + self.check_variable('q1') + self.check_variable('q2') diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/main.cpp b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/main.cpp new file mode 100644 index 000000000000..449be8d99cf6 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/main.cpp @@ -0,0 +1,11 @@ +#include <queue> +#include <vector> + +using namespace std; + +int main() { + queue<int> q1{{1,2,3,4,5}}; + queue<int, std::vector<int>> q2{{1,2,3,4,5}}; + int ret = q1.size() + q2.size(); // break here + return ret; +} diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile new file mode 100644 index 000000000000..bf75013f531d --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile @@ -0,0 +1,6 @@ +LEVEL = ../../../../../make + +CXX_SOURCES := main.cpp + +USE_LIBCPP := 1 +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py new file mode 100644 index 000000000000..b25540056a24 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py @@ -0,0 +1,51 @@ +""" +Test lldb data formatter subsystem. +""" + +from __future__ import print_function + + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestDataFormatterLibcxxTuple(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + def setUp(self): + TestBase.setUp(self) + self.line = line_number('main.cpp', '// break here') + ns = 'ndk' if lldbplatformutil.target_is_android() else '' + self.namespace = 'std::__' + ns + '1' + + @add_test_categories(["libc++"]) + def test(self): + """Test that std::tuple is displayed correctly""" + self.build() + lldbutil.run_to_source_breakpoint(self, '// break here', + lldb.SBFileSpec("main.cpp", False)) + + tuple_name = self.namespace + '::tuple' + self.expect("frame variable empty", + substrs=[tuple_name, + 'size=0', + '{}']) + + self.expect("frame variable one_elt", + substrs=[tuple_name, + 'size=1', + '{', + '[0] = 47', + '}']) + + self.expect("frame variable three_elts", + substrs=[tuple_name, + 'size=3', + '{', + '[0] = 1', + '[1] = 47', + '[2] = "foo"', + '}']) diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/main.cpp b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/main.cpp new file mode 100644 index 000000000000..1c0d0f2ae774 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/main.cpp @@ -0,0 +1,11 @@ +#include <tuple> +#include <string> + +using namespace std; + +int main() { + tuple<> empty; + tuple<int> one_elt{47}; + tuple<int, long, string> three_elts{1, 47l, "foo"}; + return 0; // break here +} diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile index 7fe01d004f03..2e8bcb9079bd 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile @@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp CFLAGS_EXTRAS += -O0 USE_LIBSTDCPP := 1 -# 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/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py index ce5087dbc288..90a958d7cfe2 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py @@ -24,6 +24,7 @@ class StdIteratorDataFormatterTestCase(TestBase): self.line = line_number('main.cpp', '// Set break point at this line.') @skipIfWindows # libstdcpp not ported to Windows + @skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): """Test that libstdcpp iterators format properly.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile index 7fe01d004f03..2e8bcb9079bd 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile @@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp CFLAGS_EXTRAS += -O0 USE_LIBSTDCPP := 1 -# 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/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py index a7f8c4b1e174..a8f99f41665f 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py @@ -28,6 +28,7 @@ class StdListDataFormatterTestCase(TestBase): 'main.cpp', '// Set final break point at this line.') @skipIfWindows # libstdcpp not ported to Windows + @skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile index 2c6c3cf72842..17868d8a95fc 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile @@ -4,11 +4,4 @@ CXX_SOURCES := main.cpp USE_LIBSTDCPP := 1 -# 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/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py index cdaec8392fe0..e25c410f91ce 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py @@ -25,6 +25,7 @@ class StdMapDataFormatterTestCase(TestBase): @skipIfWindows # libstdcpp not ported to Windows @skipIfFreeBSD + @skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile index 88cb026aba1c..63f2aaf9c75a 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile @@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp CXXFLAGS := -O0 USE_LIBSTDCPP := 1 -# 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/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py index 8d940c2686a0..6809dd3c356d 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py @@ -18,6 +18,7 @@ class StdSmartPtrDataFormatterTestCase(TestBase): @skipIfFreeBSD @skipIfWindows # libstdcpp not ported to Windows @skipIfDarwin # doesn't compile on Darwin + @skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile index 7fe01d004f03..2e8bcb9079bd 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile @@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp CFLAGS_EXTRAS += -O0 USE_LIBSTDCPP := 1 -# 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/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py index 67823c95f138..d4e9e4d30f77 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py @@ -25,6 +25,7 @@ class StdStringDataFormatterTestCase(TestBase): self.line = line_number('main.cpp', '// Set break point at this line.') @skipIfWindows # libstdcpp not ported to Windows + @skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile index beb2fd583e7a..17868d8a95fc 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile @@ -3,6 +3,5 @@ LEVEL = ../../../../../make CXX_SOURCES := main.cpp USE_LIBSTDCPP := 1 -CFLAGS_EXTRAS += $(NO_LIMIT_DEBUG_INFO_FLAGS) include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py index 56e231da8522..b38747d0f937 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py @@ -18,6 +18,7 @@ class StdTupleDataFormatterTestCase(TestBase): @skipIfFreeBSD @skipIfWindows # libstdcpp not ported to Windows @skipIfDarwin # doesn't compile on Darwin + @skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile index beb2fd583e7a..17868d8a95fc 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile @@ -3,6 +3,5 @@ LEVEL = ../../../../../make CXX_SOURCES := main.cpp USE_LIBSTDCPP := 1 -CFLAGS_EXTRAS += $(NO_LIMIT_DEBUG_INFO_FLAGS) include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py index 37adb28d7d59..23da541120f6 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py @@ -18,6 +18,7 @@ class StdUniquePtrDataFormatterTestCase(TestBase): @skipIfFreeBSD @skipIfWindows # libstdcpp not ported to Windows @skipIfDarwin # doesn't compile on Darwin + @skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) @@ -67,6 +68,7 @@ class StdUniquePtrDataFormatterTestCase(TestBase): @skipIfFreeBSD @skipIfWindows # libstdcpp not ported to Windows @skipIfDarwin # doesn't compile on Darwin + @skipIfwatchOS # libstdcpp not ported to watchos def test_recursive_unique_ptr(self): # Tests that LLDB can handle when we have a loop in the unique_ptr # reference chain and that it correctly handles the different options diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py index 17b369df3e6b..57c9e2fe5dc7 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py @@ -28,6 +28,7 @@ class StdVBoolDataFormatterTestCase(TestBase): bugnumber='llvm.org/pr20548 fails to build on lab.llvm.org buildbot') @skipIfWindows # libstdcpp not ported to Windows. @skipIfDarwin + @skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile index 88cb026aba1c..63f2aaf9c75a 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile @@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp CXXFLAGS := -O0 USE_LIBSTDCPP := 1 -# 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/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py index e4ec703495b3..e3f21eb21ec0 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py @@ -25,6 +25,7 @@ class StdVectorDataFormatterTestCase(TestBase): @skipIfFreeBSD @skipIfWindows # libstdcpp not ported to Windows + @skipIfwatchOS # libstdcpp not ported to watchos def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile index 04f39271f0cd..314f1cb2f077 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/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/functionalities/data-formatter/dump_dynamic/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile index 69dde1b76184..872bf6d20877 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile @@ -2,11 +2,4 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp CXXFLAGS += -std=c++11 -# 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/functionalities/data-formatter/stringprinter/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile index 69dde1b76184..872bf6d20877 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile @@ -2,11 +2,4 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp CXXFLAGS += -std=c++11 -# 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/functionalities/data-formatter/summary-string-onfail/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Makefile index 04f39271f0cd..314f1cb2f077 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/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/functionalities/data-formatter/var-in-aggregate-misuse/Makefile b/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile index 18c35a7d84a5..314f1cb2f077 100644 --- a/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile @@ -2,10 +2,4 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp -# Workaround for llvm.org/pr16214: clang doesn't emit structure definition DWARF -# information without the flag below. -ifneq (,$(findstring clang,$(CC))) - CFLAGS_EXTRAS += -fno-limit-debug-info -endif - include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py b/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py index e5d81d8cefc0..cee472ccb51f 100644 --- a/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py @@ -45,7 +45,7 @@ class DisassemblyTestCase(TestBase): if arch in ["", 'x86_64', 'i386', 'i686']: breakpoint_opcodes = ["int3"] instructions = [' mov', ' addl ', 'ret'] - elif arch in ["arm", "aarch64"]: + elif arch in ["arm", "aarch64", "arm64", "armv7", "armv7k"]: breakpoint_opcodes = ["brk", "udf"] instructions = [' add ', ' ldr ', ' str '] elif re.match("mips", arch): diff --git a/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py b/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py index 65271c3894b8..965af3e4910a 100644 --- a/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py +++ b/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py @@ -24,11 +24,23 @@ def execute_command(command): class ExecTestCase(TestBase): + NO_DEBUG_INFO_TESTCASE = True + mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532") - def test(self): + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems + def test_hitting_exec (self): + self.do_test(False) + + @skipUnlessDarwin + @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532") + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems + def test_skipping_exec (self): + self.do_test(False) + + def do_test(self, skip_exec): if self.getArchitecture() == 'x86_64': source = os.path.join(os.getcwd(), "main.cpp") o_file = os.path.join(os.getcwd(), "main.o") @@ -59,6 +71,16 @@ class ExecTestCase(TestBase): None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) + if skip_exec: + self.debugger.HandleCommand("settings set target.process.stop-on-exec false") + def cleanup(): + self.runCmd("settings set target.process.stop-on-exec false", + check=False) + + # Execute the cleanup function during test case tear down. + self.addTearDownHook(cleanup) + + for i in range(6): # The stop reason of the thread should be breakpoint. self.assertTrue(process.GetState() == lldb.eStateStopped, @@ -83,19 +105,25 @@ class ExecTestCase(TestBase): # Run and we should stop due to exec process.Continue() - self.assertTrue(process.GetState() == lldb.eStateStopped, - "Process should be stopped at __dyld_start") + if not skip_exec: + self.assertTrue(process.GetState() == lldb.eStateStopped, + "Process should be stopped at __dyld_start") + + threads = lldbutil.get_stopped_threads( + process, lldb.eStopReasonExec) + self.assertTrue( + len(threads) == 1, + "We got a thread stopped for exec.") - threads = lldbutil.get_stopped_threads( - process, lldb.eStopReasonExec) - self.assertTrue( - len(threads) == 1, - "We got a thread stopped for exec.") - - # Run and we should stop at breakpoint in main after exec - process.Continue() + # Run and we should stop at breakpoint in main after exec + process.Continue() threads = lldbutil.get_threads_stopped_at_breakpoint( process, breakpoint) + if self.TraceOn(): + for t in process.threads: + print(t) + if t.GetStopReason() != lldb.eStopReasonBreakpoint: + self.runCmd("bt") self.assertTrue(len(threads) == 1, "Stopped at breakpoint in exec'ed process.") diff --git a/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py b/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py index 21d4357a6ff1..719f3f719934 100644 --- a/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py +++ b/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py @@ -16,15 +16,13 @@ from lldbsuite.test import lldbutil class ExprDoesntDeadlockTestCase(TestBase): - def getCategories(self): - return ['basic_process'] - mydir = TestBase.compute_mydir(__file__) @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr17946') @expectedFailureAll( oslist=["windows"], bugnumber="Windows doesn't have pthreads, test needs to be ported") + @add_test_categories(["basic_process"]) def test_with_run_command(self): """Test that expr will time out and allow other threads to run if it blocks.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py index 46264f3dfe8d..276760d30574 100644 --- a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py +++ b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py @@ -15,6 +15,7 @@ class TestArray(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 def test_array(self): TestBase.setUp(self) self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py index dd8ff949fa98..6529e11fafa8 100644 --- a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py +++ b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py @@ -15,6 +15,7 @@ class TestBadReference(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 def test_bad_reference(self): TestBase.setUp(self) self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py index a8708169bb3b..2e6fad5e1fdb 100644 --- a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py +++ b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py @@ -15,6 +15,7 @@ class TestDiagnoseDereferenceArgument(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 def test_diagnose_dereference_argument(self): TestBase.setUp(self) self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py index 80128eec1f7e..7839a47a8f41 100644 --- a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py +++ b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py @@ -15,6 +15,7 @@ class TestDiagnoseDereferenceArgument(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 def test_diagnose_dereference_argument(self): TestBase.setUp(self) self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py index 5e097afdc9b6..8e5cd430293d 100644 --- a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py +++ b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py @@ -15,6 +15,7 @@ class TestDiagnoseDereferenceFunctionReturn(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 @expectedFailureAll(oslist=['macosx'], archs=['i386'], bugnumber="rdar://28656408") def test_diagnose_dereference_function_return(self): TestBase.setUp(self) diff --git a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py index 233c9e403bd2..201923fb89d6 100644 --- a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py +++ b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py @@ -15,6 +15,7 @@ class TestDiagnoseDereferenceThis(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 def test_diagnose_dereference_this(self): TestBase.setUp(self) self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py index 267223ad0854..08ef1c7fc5e6 100644 --- a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py +++ b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py @@ -15,6 +15,7 @@ class TestDiagnoseInheritance(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 def test_diagnose_inheritance(self): TestBase.setUp(self) self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py index a1a17c941760..e962c2673faf 100644 --- a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py +++ b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py @@ -15,6 +15,7 @@ class TestLocalVariable(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 def test_local_variable(self): TestBase.setUp(self) self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py index adf092d86157..bc11bd1afb78 100644 --- a/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py +++ b/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py @@ -15,6 +15,7 @@ class TestDiagnoseVirtualMethodCall(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 def test_diagnose_virtual_method_call(self): TestBase.setUp(self) self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py b/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py index d058b1cac560..b233d2f768e0 100644 --- a/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py +++ b/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py @@ -17,9 +17,6 @@ class CrashingInferiorTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @expectedFailureAll( - oslist=['freebsd'], - bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal") - @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24778, This actually works, but the test relies on the output format instead of the API") def test_inferior_crashing(self): @@ -60,7 +57,6 @@ class CrashingInferiorTestCase(TestBase): self.build() self.inferior_crashing_step() - @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr24939') @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24778, This actually works, but the test relies on the output format instead of the API") @@ -76,6 +72,7 @@ class CrashingInferiorTestCase(TestBase): # Inferior exits after stepping after a segfault. This is working as # intended IMHO. @skipIfLinux + @skipIfFreeBSD def test_inferior_crashing_expr_step_and_expr(self): """Test that lldb expressions work before and after stepping after a crash.""" self.build() @@ -110,7 +107,7 @@ class CrashingInferiorTestCase(TestBase): # The exact stop reason depends on the platform if self.platformIsDarwin(): stop_reason = 'stop reason = EXC_BAD_ACCESS' - elif self.getPlatform() == "linux": + elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd": stop_reason = 'stop reason = signal SIGSEGV' else: stop_reason = 'stop reason = invalid address' diff --git a/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py index f04173a3e8d2..9987377a83ec 100644 --- a/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py +++ b/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py @@ -16,9 +16,6 @@ class CrashingRecursiveInferiorTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @expectedFailureAll( - oslist=['freebsd'], - bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal") @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778") def test_recursive_inferior_crashing(self): """Test that lldb reliably catches the inferior crashing (command).""" @@ -50,7 +47,6 @@ class CrashingRecursiveInferiorTestCase(TestBase): self.build() self.recursive_inferior_crashing_step() - @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr24939') @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778") @skipIfTargetAndroid() # debuggerd interferes with this test on Android def test_recursive_inferior_crashing_step_after_break(self): @@ -61,6 +57,7 @@ class CrashingRecursiveInferiorTestCase(TestBase): # Inferior exits after stepping after a segfault. This is working as # intended IMHO. @skipIfLinux + @skipIfFreeBSD @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778") def test_recursive_inferior_crashing_expr_step_and_expr(self): """Test that lldb expressions work before and after stepping after a crash.""" @@ -94,7 +91,7 @@ class CrashingRecursiveInferiorTestCase(TestBase): # The exact stop reason depends on the platform if self.platformIsDarwin(): stop_reason = 'stop reason = EXC_BAD_ACCESS' - elif self.getPlatform() == "linux": + elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd": stop_reason = 'stop reason = signal SIGSEGV' else: stop_reason = 'stop reason = invalid address' diff --git a/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py b/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py index 0ebb99d3fd43..43fa5f9d33f2 100644 --- a/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py +++ b/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py @@ -22,6 +22,7 @@ class LaunchWithShellExpandTestCase(TestBase): "linux", "freebsd"], bugnumber="llvm.org/pr24778 llvm.org/pr22627") + @skipIfDarwinEmbedded # iOS etc don't launch the binary via a shell, so arg expansion won't happen def test(self): self.build() exe = os.path.join(os.getcwd(), "a.out") diff --git a/packages/Python/lldbsuite/test/functionalities/load_unload/.categories b/packages/Python/lldbsuite/test/functionalities/load_unload/.categories new file mode 100644 index 000000000000..c00c25822e4c --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/load_unload/.categories @@ -0,0 +1 @@ +basic_process diff --git a/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile b/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile index 779745c4d26c..9a954a201cf2 100644 --- a/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile @@ -8,11 +8,17 @@ CXX_SOURCES := main.cpp include $(LEVEL)/Makefile.rules .PHONY: -a.out: lib_a lib_b lib_c lib_d hidden_lib_d +a.out: lib_a lib_b lib_c lib_d hidden_lib_d install_name_tool lib_%: $(MAKE) -f $*.mk +install_name_tool: +ifeq ($(OS),Darwin) + install_name_tool -id @executable_path/libloadunload_d.dylib libloadunload_d.dylib +endif + + hidden_lib_d: $(MAKE) -C hidden diff --git a/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py b/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py index 027968a727f1..98b0c9ca1971 100644 --- a/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py +++ b/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py @@ -17,9 +17,6 @@ from lldbsuite.test import lldbutil @skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently class LoadUnloadTestCase(TestBase): - def getCategories(self): - return ['basic_process'] - mydir = TestBase.compute_mydir(__file__) def setUp(self): @@ -56,10 +53,14 @@ class LoadUnloadTestCase(TestBase): Does nothing in case of non-remote platforms. """ if lldb.remote_platform: - cwd = os.getcwd() - shlibs = ['libloadunload_a.so', 'libloadunload_b.so', - 'libloadunload_c.so', 'libloadunload_d.so'] + ext = 'so' + if self.platformIsDarwin(): + ext = 'dylib' + + shlibs = ['libloadunload_a.' + ext, 'libloadunload_b.' + ext, + 'libloadunload_c.' + ext, 'libloadunload_d.' + ext] wd = lldb.remote_platform.GetWorkingDirectory() + cwd = os.getcwd() for f in shlibs: err = lldb.remote_platform.Put( lldb.SBFileSpec(os.path.join(cwd, f)), @@ -69,7 +70,7 @@ class LoadUnloadTestCase(TestBase): "Unable copy '%s' to '%s'.\n>>> %s" % (f, wd, err.GetCString())) if hidden_dir: - shlib = 'libloadunload_d.so' + shlib = 'libloadunload_d.' + ext hidden_dir = os.path.join(wd, 'hidden') hidden_file = os.path.join(hidden_dir, shlib) err = lldb.remote_platform.MakeDirectory(hidden_dir) diff --git a/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py b/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py index 6a779ecfac5b..eb6981d04fad 100644 --- a/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py +++ b/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py @@ -17,6 +17,7 @@ class MTCSimpleTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIfDarwinEmbedded # Test file depends on AppKit which is not present on iOS etc. def test(self): self.mtc_dylib_path = findMainThreadCheckerDylib() if self.mtc_dylib_path == "": @@ -29,6 +30,7 @@ class MTCSimpleTestCase(TestBase): # Call super's setUp(). TestBase.setUp(self) + @skipIf(archs=['i386']) def mtc_tests(self): # Load the test exe = os.path.join(os.getcwd(), "a.out") diff --git a/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py b/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py new file mode 100644 index 000000000000..54ea33ad24a9 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py @@ -0,0 +1,76 @@ +""" +Test the lldb platform Python API. +""" + +from __future__ import print_function + + +import os +import time +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class PlatformPythonTestCase(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + @add_test_categories(['pyapi']) + @no_debug_info_test + def test_platform_list(self): + """Test SBDebugger::GetNumPlatforms() & GetPlatformAtIndex() API""" + # Verify the host platform is present by default. + initial_num_platforms = self.dbg.GetNumPlatforms() + self.assertGreater(initial_num_platforms, 0) + host_platform = self.dbg.GetPlatformAtIndex(0) + self.assertTrue(host_platform.IsValid() and + host_platform.GetName() == 'host', + 'The host platform is present') + # Select another platform and verify that the platform is added to + # the platform list. + platform_idx = self.dbg.GetNumAvailablePlatforms() - 1 + if platform_idx < 1: + self.fail('No platforms other than host are available') + platform_data = self.dbg.GetAvailablePlatformInfoAtIndex(platform_idx) + platform_name = platform_data.GetValueForKey('name').GetStringValue(100) + self.assertNotEqual(platform_name, 'host') + self.dbg.SetCurrentPlatform(platform_name) + selected_platform = self.dbg.GetSelectedPlatform() + self.assertTrue(selected_platform.IsValid()) + self.assertEqual(selected_platform.GetName(), platform_name) + self.assertEqual(self.dbg.GetNumPlatforms(), initial_num_platforms + 1) + platform_found = False + for platform_idx in range(self.dbg.GetNumPlatforms()): + platform = self.dbg.GetPlatformAtIndex(platform_idx) + if platform.GetName() == platform_name: + platform_found = True + break + self.assertTrue(platform_found) + + @add_test_categories(['pyapi']) + @no_debug_info_test + def test_available_platform_list(self): + """Test SBDebugger::GetNumAvailablePlatforms() and GetAvailablePlatformInfoAtIndex() API""" + num_platforms = self.dbg.GetNumAvailablePlatforms() + self.assertGreater( + num_platforms, 0, + 'There should be at least one platform available') + + for i in range(num_platforms): + platform_data = self.dbg.GetAvailablePlatformInfoAtIndex(i) + name_data = platform_data.GetValueForKey('name') + desc_data = platform_data.GetValueForKey('description') + self.assertTrue( + name_data and name_data.IsValid(), + 'Platform has a name') + self.assertEqual( + name_data.GetType(), lldb.eStructuredDataTypeString, + 'Platform name is a string') + self.assertTrue( + desc_data and desc_data.IsValid(), + 'Platform has a description') + self.assertEqual( + desc_data.GetType(), lldb.eStructuredDataTypeString, + 'Platform description is a string') diff --git a/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py b/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py index 18c0da832606..63b93340cef3 100644 --- a/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py +++ b/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py @@ -24,11 +24,13 @@ class LinuxCoreTestCase(TestBase): _mips64_n64_pid = 25619 _mips64_n32_pid = 3670 _mips_o32_pid = 3532 + _ppc64le_pid = 28147 _i386_regions = 4 _x86_64_regions = 5 _s390x_regions = 2 _mips_regions = 5 + _ppc64le_regions = 2 def setUp(self): super(LinuxCoreTestCase, self).setUp() @@ -58,6 +60,12 @@ class LinuxCoreTestCase(TestBase): @skipIf(oslist=['windows']) @skipIf(triple='^mips') + def test_ppc64le(self): + """Test that lldb can read the process information from an ppc64le linux core file.""" + self.do_test("linux-ppc64le", self._ppc64le_pid, self._ppc64le_regions) + + @skipIf(oslist=['windows']) + @skipIf(triple='^mips') def test_x86_64(self): """Test that lldb can read the process information from an x86_64 linux core file.""" self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions) @@ -137,7 +145,7 @@ class LinuxCoreTestCase(TestBase): values = {} values["fctrl"] = "0x037f" values["fstat"] = "0x0000" - values["ftag"] = "0xff" + values["ftag"] = "0x00ff" values["fop"] = "0x0000" values["fiseg"] = "0x00000000" values["fioff"] = "0x0040011e" @@ -244,6 +252,34 @@ class LinuxCoreTestCase(TestBase): end_region.GetRegionBase()) self.assertEqual(end_region.GetRegionEnd(), lldb.LLDB_INVALID_ADDRESS) + def check_state(self, process): + with open(os.devnull) as devnul: + # sanitize test output + self.dbg.SetOutputFileHandle(devnul, False) + self.dbg.SetErrorFileHandle(devnul, False) + + self.assertTrue(process.is_stopped) + + # Process.Continue + error = process.Continue() + self.assertFalse(error.Success()) + self.assertTrue(process.is_stopped) + + # Thread.StepOut + thread = process.GetSelectedThread() + thread.StepOut() + self.assertTrue(process.is_stopped) + + # command line + self.dbg.HandleCommand('s') + self.assertTrue(process.is_stopped) + self.dbg.HandleCommand('c') + self.assertTrue(process.is_stopped) + + # restore file handles + self.dbg.SetOutputFileHandle(None, False) + self.dbg.SetErrorFileHandle(None, False) + def do_test(self, filename, pid, region_count): target = self.dbg.CreateTarget(filename + ".out") process = target.LoadCore(filename + ".core") @@ -251,6 +287,8 @@ class LinuxCoreTestCase(TestBase): self.assertEqual(process.GetNumThreads(), 1) self.assertEqual(process.GetProcessID(), pid) + self.check_state(process) + thread = process.GetSelectedThread() self.assertTrue(thread) self.assertEqual(thread.GetThreadID(), pid) diff --git a/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.core b/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.core Binary files differnew file mode 100644 index 000000000000..c0ed578bd796 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.core diff --git a/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.out b/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.out Binary files differnew file mode 100755 index 000000000000..05c69fd291b7 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.out diff --git a/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py index 9becd8756318..178bb678df7c 100644 --- a/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py +++ b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py @@ -31,6 +31,34 @@ class MiniDumpNewTestCase(TestBase): lldb.DBG.SetSelectedPlatform(self._initial_platform) super(MiniDumpNewTestCase, self).tearDown() + def check_state(self): + with open(os.devnull) as devnul: + # sanitize test output + self.dbg.SetOutputFileHandle(devnul, False) + self.dbg.SetErrorFileHandle(devnul, False) + + self.assertTrue(self.process.is_stopped) + + # Process.Continue + error = self.process.Continue() + self.assertFalse(error.Success()) + self.assertTrue(self.process.is_stopped) + + # Thread.StepOut + thread = self.process.GetSelectedThread() + thread.StepOut() + self.assertTrue(self.process.is_stopped) + + # command line + self.dbg.HandleCommand('s') + self.assertTrue(self.process.is_stopped) + self.dbg.HandleCommand('c') + self.assertTrue(self.process.is_stopped) + + # restore file handles + self.dbg.SetOutputFileHandle(None, False) + self.dbg.SetErrorFileHandle(None, False) + def test_process_info_in_minidump(self): """Test that lldb can read the process information from the Minidump.""" # target create -c linux-x86_64.dmp @@ -40,6 +68,7 @@ class MiniDumpNewTestCase(TestBase): self.assertTrue(self.process, PROCESS_IS_VALID) self.assertEqual(self.process.GetNumThreads(), 1) self.assertEqual(self.process.GetProcessID(), self._linux_x86_64_pid) + self.check_state() def test_thread_info_in_minidump(self): """Test that lldb can read the thread information from the Minidump.""" @@ -47,6 +76,7 @@ class MiniDumpNewTestCase(TestBase): self.dbg.CreateTarget(None) self.target = self.dbg.GetSelectedTarget() self.process = self.target.LoadCore("linux-x86_64.dmp") + self.check_state() # This process crashed due to a segmentation fault in its # one and only thread. self.assertEqual(self.process.GetNumThreads(), 1) @@ -61,6 +91,7 @@ class MiniDumpNewTestCase(TestBase): self.dbg.CreateTarget("linux-x86_64") self.target = self.dbg.GetSelectedTarget() self.process = self.target.LoadCore("linux-x86_64.dmp") + self.check_state() self.assertEqual(self.process.GetNumThreads(), 1) self.assertEqual(self.process.GetProcessID(), self._linux_x86_64_pid) thread = self.process.GetThreadAtIndex(0) @@ -81,6 +112,7 @@ class MiniDumpNewTestCase(TestBase): self.dbg.CreateTarget(None) self.target = self.dbg.GetSelectedTarget() self.process = self.target.LoadCore("linux-x86_64_not_crashed.dmp") + self.check_state() self.assertEqual(self.process.GetNumThreads(), 1) thread = self.process.GetThreadAtIndex(0) self.assertEqual(thread.GetStopReason(), lldb.eStopReasonNone) @@ -161,9 +193,10 @@ class MiniDumpNewTestCase(TestBase): """Test that we can examine local variables in a Minidump.""" # Launch with the Minidump, and inspect a local variable. # target create linux-x86_64_not_crashed -c linux-x86_64_not_crashed.dmp - target = self.dbg.CreateTarget("linux-x86_64_not_crashed") - process = target.LoadCore("linux-x86_64_not_crashed.dmp") - thread = process.GetThreadAtIndex(0) + self.target = self.dbg.CreateTarget("linux-x86_64_not_crashed") + self.process = self.target.LoadCore("linux-x86_64_not_crashed.dmp") + self.check_state() + thread = self.process.GetThreadAtIndex(0) frame = thread.GetFrameAtIndex(1) value = frame.EvaluateExpression('x') self.assertEqual(value.GetValueAsSigned(), 3) diff --git a/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py index b89a305d0e88..c7b64d783c71 100644 --- a/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py +++ b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -41,6 +41,7 @@ class MiniDumpTestCase(TestBase): stop_description = thread.GetStopDescription(256) self.assertTrue("0xc0000005" in stop_description) + @expectedFailureAll(bugnumber="llvm.org/pr35193", hostoslist=["windows"]) def test_stack_info_in_mini_dump(self): """Test that we can see a trivial stack in a VS-generate mini dump.""" # target create -c fizzbuzz_no_heap.dmp @@ -49,14 +50,14 @@ class MiniDumpTestCase(TestBase): self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp") self.assertEqual(self.process.GetNumThreads(), 1) thread = self.process.GetThreadAtIndex(0) - # The crash is in main, so there should be one frame on the stack. - self.assertEqual(thread.GetNumFrames(), 1) - frame = thread.GetFrameAtIndex(0) - self.assertTrue(frame.IsValid()) - pc = frame.GetPC() - eip = frame.FindRegister("pc") - self.assertTrue(eip.IsValid()) - self.assertEqual(pc, eip.GetValueAsUnsigned()) + + pc_list = [ 0x00164d14, 0x00167c79, 0x00167e6d, 0x7510336a, 0x77759882, 0x77759855] + + self.assertEqual(thread.GetNumFrames(), len(pc_list)) + for i in range(len(pc_list)): + frame = thread.GetFrameAtIndex(i) + self.assertTrue(frame.IsValid()) + self.assertEqual(frame.GetPC(), pc_list[i]) @skipUnlessWindows # Minidump saving works only on windows def test_deeper_stack_in_mini_dump(self): diff --git a/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py b/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py index 716d0d4f5bc7..c4d372cd3d30 100644 --- a/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py +++ b/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py @@ -8,6 +8,7 @@ from __future__ import print_function import os import time import lldb +import shutil from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil @@ -22,6 +23,7 @@ class ProcessAttachTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True @skipIfiOSSimulator + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_attach_to_process_by_id(self): """Test attach by process id""" self.build() @@ -38,6 +40,34 @@ class ProcessAttachTestCase(TestBase): process = target.GetProcess() self.assertTrue(process, PROCESS_IS_VALID) + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails + def test_attach_to_process_from_different_dir_by_id(self): + """Test attach by process id""" + try: + os.mkdir(os.path.join(os.getcwd(),'newdir')) + except OSError, e: + if e.errno != os.errno.EEXIST: + raise + testdir = os.getcwd() + newdir = os.path.join(testdir,'newdir') + exe = os.path.join(newdir, 'proc_attach') + self.buildProgram('main.cpp', exe) + self.addTearDownHook(lambda: shutil.rmtree(newdir)) + + # Spawn a new process + popen = self.spawnSubprocess(exe) + self.addTearDownHook(self.cleanupSubprocesses) + + os.chdir('newdir') + self.addTearDownHook(lambda: os.chdir(testdir)) + self.runCmd("process attach -p " + str(popen.pid)) + + target = self.dbg.GetSelectedTarget() + + process = target.GetProcess() + self.assertTrue(process, PROCESS_IS_VALID) + + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_attach_to_process_by_name(self): """Test attach by process name""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py b/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py index 071f5d57c78f..5465b7155f50 100644 --- a/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py +++ b/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py @@ -21,6 +21,7 @@ class AttachDeniedTestCase(TestBase): @skipIfWindows @skipIfiOSSimulator + @skipIfDarwinEmbedded # ptrace(ATTACH_REQUEST...) won't work on ios/tvos/etc def test_attach_to_process_by_id_denied(self): """Test attach by process id denied""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py b/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py index 00b4d4153403..91436446ad99 100644 --- a/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py +++ b/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py @@ -23,6 +23,7 @@ class ChangeProcessGroupTestCase(TestBase): @skipIfFreeBSD # Times out on FreeBSD llvm.org/pr23731 @skipIfWindows # setpgid call does not exist on Windows @expectedFailureAndroid("http://llvm.org/pr23762", api_levels=[16]) + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_setpgid(self): self.build() exe = os.path.join(os.getcwd(), 'a.out') diff --git a/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py b/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py index fe6ce2c25a3e..83cc48847c99 100644 --- a/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py +++ b/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py @@ -45,7 +45,7 @@ class RegisterCommandsTestCase(TestBase): self.runCmd("register read xmm0") self.runCmd("register read ymm15") # may be available self.runCmd("register read bnd0") # may be available - elif self.getArchitecture() in ['arm']: + elif self.getArchitecture() in ['arm', 'armv7', 'armv7k', 'arm64']: self.runCmd("register read s0") self.runCmd("register read q15") # may be available @@ -84,7 +84,10 @@ class RegisterCommandsTestCase(TestBase): if self.getArchitecture() in ['amd64', 'i386', 'x86_64']: gpr = "eax" vector = "xmm0" - elif self.getArchitecture() in ['arm']: + elif self.getArchitecture() in ['arm64', 'aarch64']: + gpr = "w0" + vector = "v0" + elif self.getArchitecture() in ['arm', 'armv7', 'armv7k']: gpr = "r0" vector = "q0" @@ -269,14 +272,18 @@ class RegisterCommandsTestCase(TestBase): target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) - lldbutil.run_break_set_by_symbol( - self, "main", num_expected_locations=-1) - - # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple( - None, None, self.get_process_working_directory()) + # Launch the process, stop at the entry point. + error = lldb.SBError() + process = target.Launch( + lldb.SBListener(), + None, None, # argv, envp + None, None, None, # stdin/out/err + self.get_process_working_directory(), + 0, # launch flags + True, # stop at entry + error) + self.assertTrue(error.Success(), "Launch succeeds. Error is :" + str(error)) - process = target.GetProcess() self.assertTrue( process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) @@ -317,7 +324,35 @@ class RegisterCommandsTestCase(TestBase): ("xmm15", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}", False)) - elif self.getArchitecture() in ['arm']: + elif self.getArchitecture() in ['arm64', 'aarch64']: + reg_list = [ + # reg value + # must-have + ("fpsr", "0xfbf79f9f", True), + ("s0", "1.25", True), + ("s31", "0.75", True), + ("d1", "123", True), + ("d17", "987", False), + ("v1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True), + ("v14", + "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}", + False), + ] + elif self.getArchitecture() in ['armv7'] and self.platformIsDarwin(): + reg_list = [ + # reg value + # must-have + ("fpsr", "0xfbf79f9f", True), + ("s0", "1.25", True), + ("s31", "0.75", True), + ("d1", "123", True), + ("d17", "987", False), + ("q1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True), + ("q14", + "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}", + False), + ] + elif self.getArchitecture() in ['arm', 'armv7k']: reg_list = [ # reg value # must-have diff --git a/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py b/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py index 1750bd31b3df..606a71ff5019 100644 --- a/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py +++ b/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py @@ -22,6 +22,10 @@ class ReturnValueTestCase(TestBase): return ("clang" in self.getCompiler() and self.getArchitecture() == "aarch64" and self.getPlatform() == "linux") + # ABIMacOSX_arm can't fetch simple values inside a structure + def affected_by_radar_34562999(self): + return (self.getArchitecture() == 'armv7' or self.getArchitecture() == 'armv7k') and self.platformIsDarwin() + @expectedFailureAll(oslist=["freebsd"], archs=["i386"]) @expectedFailureAll(oslist=["macosx"], archs=["i386"], bugnumber="<rdar://problem/28719652>") @expectedFailureAll( @@ -142,33 +146,34 @@ class ReturnValueTestCase(TestBase): #self.assertTrue(in_float == return_float) - self.return_and_test_struct_value("return_one_int") - self.return_and_test_struct_value("return_two_int") - self.return_and_test_struct_value("return_three_int") - self.return_and_test_struct_value("return_four_int") - if not self.affected_by_pr33042(): - self.return_and_test_struct_value("return_five_int") - - self.return_and_test_struct_value("return_two_double") - self.return_and_test_struct_value("return_one_double_two_float") - self.return_and_test_struct_value("return_one_int_one_float_one_int") - - self.return_and_test_struct_value("return_one_pointer") - self.return_and_test_struct_value("return_two_pointer") - self.return_and_test_struct_value("return_one_float_one_pointer") - self.return_and_test_struct_value("return_one_int_one_pointer") - self.return_and_test_struct_value("return_three_short_one_float") - - self.return_and_test_struct_value("return_one_int_one_double") - self.return_and_test_struct_value("return_one_int_one_double_one_int") - self.return_and_test_struct_value( - "return_one_short_one_double_one_short") - self.return_and_test_struct_value("return_one_float_one_int_one_float") - self.return_and_test_struct_value("return_two_float") - # I am leaving out the packed test until we have a way to tell CLANG - # about alignment when reading DWARF for packed types. - #self.return_and_test_struct_value ("return_one_int_one_double_packed") - self.return_and_test_struct_value("return_one_int_one_long") + if not self.affected_by_radar_34562999(): + self.return_and_test_struct_value("return_one_int") + self.return_and_test_struct_value("return_two_int") + self.return_and_test_struct_value("return_three_int") + self.return_and_test_struct_value("return_four_int") + if not self.affected_by_pr33042(): + self.return_and_test_struct_value("return_five_int") + + self.return_and_test_struct_value("return_two_double") + self.return_and_test_struct_value("return_one_double_two_float") + self.return_and_test_struct_value("return_one_int_one_float_one_int") + + self.return_and_test_struct_value("return_one_pointer") + self.return_and_test_struct_value("return_two_pointer") + self.return_and_test_struct_value("return_one_float_one_pointer") + self.return_and_test_struct_value("return_one_int_one_pointer") + self.return_and_test_struct_value("return_three_short_one_float") + + self.return_and_test_struct_value("return_one_int_one_double") + self.return_and_test_struct_value("return_one_int_one_double_one_int") + self.return_and_test_struct_value( + "return_one_short_one_double_one_short") + self.return_and_test_struct_value("return_one_float_one_int_one_float") + self.return_and_test_struct_value("return_two_float") + # I am leaving out the packed test until we have a way to tell CLANG + # about alignment when reading DWARF for packed types. + #self.return_and_test_struct_value ("return_one_int_one_double_packed") + self.return_and_test_struct_value("return_one_int_one_long") @expectedFailureAll(oslist=["freebsd"], archs=["i386"]) @expectedFailureAll(oslist=["macosx"], archs=["i386"], bugnumber="<rdar://problem/28719652>") @@ -181,6 +186,7 @@ class ReturnValueTestCase(TestBase): archs=["i386"]) @expectedFailureAll(compiler=["gcc"], archs=["x86_64", "i386"]) @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778") + @skipIfDarwinEmbedded # <rdar://problem/33976032> ABIMacOSX_arm64 doesn't get structs this big correctly def test_vector_values(self): self.build() exe = os.path.join(os.getcwd(), "a.out") diff --git a/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py b/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py index 16681fdbcdef..97de99640f50 100644 --- a/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py +++ b/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py @@ -18,9 +18,6 @@ class HandleSegvTestCase(TestBase): @skipIfWindows # signals do not exist on Windows @skipIfDarwin - @expectedFailureAll( - oslist=['freebsd'], - bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal") def test_inferior_handle_sigsegv(self): self.build() exe = os.path.join(os.getcwd(), "a.out") diff --git a/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py b/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py index b0b2e609ba6b..7ec934f26e0b 100644 --- a/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py +++ b/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py @@ -52,6 +52,7 @@ class ReturnValueTestCase(TestBase): "3.9"], archs=["i386"], bugnumber="llvm.org/pr28549") + @expectedFailureAll(oslist=["ios", "tvos", "bridgeos"], bugnumber="<rdar://problem/34026777>") # lldb doesn't step past last source line in function on arm64 def test_step_in_with_python(self): """Test stepping in using avoid-no-debug with dwarf.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py b/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py index fa5c6de05650..74088581bad4 100644 --- a/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py +++ b/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py @@ -39,6 +39,7 @@ class StopHookMechanismTestCase(TestBase): @expectedFailureAll( hostoslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows") + @skipIf(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k']) # <rdar://problem/34582291> problem with armv7 and step-over and stop-hook firing on ios etc systems def test(self): """Test the stop-hook mechanism.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py index c600d8ed21be..275d54d2149c 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py @@ -14,9 +14,9 @@ class ConcurrentBreakpointsDelayedBreakpointOneWatchpoint( mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test a breakpoint, a delayed breakpoint, and one watchpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py index 169903816fa9..c9cc6db96004 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py @@ -13,9 +13,9 @@ class ConcurrentCrashWithWatchpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """ Test a thread that crashes while another thread hits a watchpoint.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py index 4a58e7cf6d71..d99107b6e9b6 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py @@ -13,9 +13,9 @@ class ConcurrentCrashWithWatchpointBreakpointSignal(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """ Test a thread that crashes while other threads generate a signal and hit a watchpoint and breakpoint. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py index d5d4641bc164..28c5c68d4506 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py @@ -13,9 +13,9 @@ class ConcurrentDelaySignalWatch(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test a watchpoint and a (1 second delay) signal in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py index 9cbb40cb6019..2d7c984e0e1c 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py @@ -13,9 +13,9 @@ class ConcurrentDelayWatchBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test (1-second delay) watchpoint and a breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py index ccbeeb07d3a8..0564c86dfcbd 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py @@ -13,9 +13,9 @@ class ConcurrentDelayedCrashWithBreakpointWatchpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """ Test a thread with a delayed crash while other threads hit a watchpoint and a breakpoint. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/main.cpp b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/main.cpp index 540b5148aefa..c888aa0b6eb6 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/main.cpp +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/main.cpp @@ -29,7 +29,7 @@ typedef std::vector<pthread_t> thread_vector; pseudo_barrier_t g_barrier; int g_breakpoint = 0; int g_sigusr1_count = 0; -std::atomic_int g_watchme; +uint32_t g_watchme; struct action_args { int delay; @@ -74,7 +74,7 @@ watchpoint_func (void *input) { pseudo_barrier_wait(g_barrier); do_action_args(input); - g_watchme += 1; // watchpoint triggers here + g_watchme = 1; // watchpoint triggers here return 0; } diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py index 73c1704e7e54..96b610f2b90b 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py @@ -17,6 +17,7 @@ class ConcurrentManyWatchpoints(ConcurrentEventsBase): "Skip this long running test") # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test 100 watchpoints from 100 threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py index b9a7c5f568cb..b921ac04ccc5 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py @@ -13,9 +13,9 @@ class ConcurrentNWatchNBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test with 5 watchpoint and breakpoint threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py index 128245343803..2f3b858854b8 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py @@ -13,9 +13,9 @@ class ConcurrentSignalDelayWatch(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test a (1 second delay) watchpoint and a signal in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py index 56217e1e8c3f..ebb13d99fb3c 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py @@ -13,9 +13,9 @@ class ConcurrentSignalNWatchNBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test one signal thread with 5 watchpoint and breakpoint threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py index 001062896265..0fbaf364045d 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py @@ -13,9 +13,9 @@ class ConcurrentSignalWatch(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test a watchpoint and a signal in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py index d7725002f2bd..53da6658550d 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py @@ -13,9 +13,9 @@ class ConcurrentSignalWatchBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test a signal/watchpoint/breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py index f26a5dc6f848..687be17ddc5a 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py @@ -13,9 +13,9 @@ class ConcurrentTwoBreakpointsOneWatchpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a breakpoint and one watchpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py index 059e077be98c..025d91169451 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py @@ -13,9 +13,9 @@ class ConcurrentTwoWatchpointThreads(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py index 4b3c35ea8e68..5e95531ae09a 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py @@ -13,9 +13,9 @@ class ConcurrentTwoWatchpointsOneBreakpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint and one breakpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py index ae6f64451abf..aa57e816bb58 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py @@ -13,9 +13,9 @@ class ConcurrentTwoWatchpointsOneDelayBreakpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint and one (1 second delay) breakpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py index 78f2dbbc8325..31b583c1a65a 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py @@ -13,9 +13,10 @@ class ConcurrentTwoWatchpointsOneSignal(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @expectedFailureAll(bugnumber="llvm.org/pr35228", archs=["arm", "aarch64"]) + @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint and one signal thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py index ffa6909129ad..241ea5b64a03 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py @@ -13,9 +13,9 @@ class ConcurrentWatchBreak(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test watchpoint and a breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py index 4c8b5b319ae4..79a54b620e53 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py @@ -13,9 +13,9 @@ class ConcurrentWatchBreakDelay(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test watchpoint and a (1 second delay) breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py index 0d545b31230f..6a37abdbcbb8 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py @@ -13,9 +13,9 @@ class ConcurrentWatchpointDelayWatchpointOneBreakpoint(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint (one with a 1 second delay) and one breakpoint thread. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py index 56cd85da88d3..67ac92b853cd 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py @@ -13,9 +13,9 @@ class ConcurrentWatchpointWithDelayWatchpointThreads(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) @skipIfFreeBSD # timing out on buildbot - @skipIfRemoteDueToDeadlock # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') + @add_test_categories(["watchpoint"]) def test(self): """Test two threads that trigger a watchpoint where one thread has a 1 second delay. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py index fb6208a0d3e5..442887ed4e13 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py @@ -23,6 +23,7 @@ class CreateAfterAttachTestCase(TestBase): # Occasionally hangs on Windows, may be same as other issues. @skipIfWindows @skipIfiOSSimulator + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_create_after_attach_with_popen(self): """Test thread creation after process attach.""" self.build(dictionary=self.getBuildFlags(use_cpp11=False)) @@ -33,6 +34,7 @@ class CreateAfterAttachTestCase(TestBase): @skipIfRemote @skipIfWindows # Windows doesn't have fork. @skipIfiOSSimulator + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_create_after_attach_with_fork(self): """Test thread creation after process attach.""" self.build(dictionary=self.getBuildFlags(use_cpp11=False)) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py b/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py index 5c0544f0ccab..456c890673cc 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py @@ -26,9 +26,6 @@ class ExitDuringBreakpointTestCase(TestBase): @expectedFailureAll( oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained") - @expectedFailureAll( - oslist=["freebsd"], - bugnumber="llvm.org/pr18190 thread states not properly maintained") def test(self): """Test thread exit during breakpoint handling.""" self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py b/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py index 85fa5d380cff..75a9b8873dda 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py @@ -8,6 +8,7 @@ from __future__ import print_function import os import time import lldb +from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil @@ -60,7 +61,8 @@ class NumberOfThreadsTestCase(TestBase): self.assertTrue( num_threads >= 13, 'Number of expected threads and actual threads do not match.') - + + @skipIfDarwin # rdar://33462362 def test_unique_stacks(self): """Test backtrace unique with multiple threads executing the same stack.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py b/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py index f043013b90ce..9c8bbf1eb081 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py @@ -40,6 +40,7 @@ class ThreadStepOutTestCase(TestBase): oslist=["freebsd"], bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint") @expectedFailureAll(oslist=["windows"]) + @expectedFailureAll(oslist=["watchos"], archs=['armv7k'], bugnumber="rdar://problem/34674488") # stop reason is trace when it should be step-out def test_step_all_threads(self): """Test thread step out on all threads via command interpreter. """ self.build(dictionary=self.getBuildFlags()) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/step_until/.categories b/packages/Python/lldbsuite/test/functionalities/thread/step_until/.categories new file mode 100644 index 000000000000..c00c25822e4c --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/thread/step_until/.categories @@ -0,0 +1 @@ +basic_process diff --git a/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py b/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py index ec34c9985d3e..d63d5c55bc82 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py @@ -15,9 +15,6 @@ class TestCStepping(TestBase): mydir = TestBase.compute_mydir(__file__) - def getCategories(self): - return ['basic_process'] - def setUp(self): # Call super's setUp(). TestBase.setUp(self) diff --git a/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py b/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py index 0377b0c0a80e..8f004e6d319b 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py @@ -20,6 +20,7 @@ class ThreadSpecificBreakTestCase(TestBase): @add_test_categories(['pyapi']) @expectedFailureAll(oslist=["windows"]) + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563920') # armv7 ios problem - breakpoint with tid qualifier isn't working def test_python(self): """Test that we obey thread conditioned breakpoints.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py b/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py index da9ba59f9924..3eddaca3e30d 100644 --- a/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py +++ b/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py @@ -24,6 +24,7 @@ class ThreadSpecificBreakPlusConditionTestCase(TestBase): # hits break in another thread in testrun @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr18522') @add_test_categories(['pyapi']) + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563348') # Two threads seem to end up with the same my_value when built for armv7. def test_python(self): """Test that we obey thread conditioned breakpoints.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile b/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile index b69775dc199a..8a7102e347af 100644 --- a/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile +++ b/packages/Python/lldbsuite/test/functionalities/type_completion/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/functionalities/unwind/sigtramp/TestSigtrampUnwind.py b/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py index e35bb966c918..598efbc5e030 100644 --- a/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py +++ b/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py @@ -19,6 +19,7 @@ class SigtrampUnwind(TestBase): # On different platforms the "_sigtramp" and "__kill" frames are likely to be different. # This test could probably be adapted to run on linux/*bsd easily enough. @skipUnlessDarwin + @expectedFailureAll(oslist=["ios", "watchos", "tvos", "bridgeos"], bugnumber="<rdar://problem/34006863>") # lldb skips 1 frame on arm64 above _sigtramp def test(self): """Test that we can backtrace correctly with _sigtramp on the stack""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/.categories b/packages/Python/lldbsuite/test/functionalities/watchpoint/.categories new file mode 100644 index 000000000000..50c1613cda72 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/.categories @@ -0,0 +1 @@ +watchpoint diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py index 6a68730e08ed..9fac249936ea 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py @@ -33,8 +33,6 @@ class HelloWatchLocationTestCase(TestBase): self.exe_name = self.testMethodName self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -43,12 +41,6 @@ class HelloWatchLocationTestCase(TestBase): @expectedFailureAll(triple=re.compile('^mips')) # SystemZ also currently supports only one H/W watchpoint @expectedFailureAll(archs=['s390x']) - @expectedFailureAll( - oslist=["linux"], - archs=[ - "arm", - "aarch64"], - bugnumber="llvm.org/pr27795") @skipIfDarwin def test_hello_watchlocation(self): """Test watching a location with '-s size' option.""" diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py index c74452fd375e..2cfba398bac9 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py @@ -15,9 +15,6 @@ from lldbsuite.test import lldbutil class HelloWatchpointTestCase(TestBase): - def getCategories(self): - return ['basic_process'] - mydir = TestBase.compute_mydir(__file__) def setUp(self): @@ -34,11 +31,10 @@ class HelloWatchpointTestCase(TestBase): self.exe_name = 'a.out' self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") + @add_test_categories(["basic_process"]) def test_hello_watchpoint_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.build(dictionary=self.d) diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py index 2e58cb893b73..ac2c2fb8ec5a 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py @@ -30,8 +30,6 @@ class WatchpointSlotsTestCase(TestBase): self.exe_name = 'a.out' self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) # This is a arm and aarch64 specific test case. No other architectures tested. @skipIf(archs=no_match(['arm', 'aarch64'])) def test_multiple_watchpoints_on_same_word(self): @@ -67,9 +65,12 @@ class WatchpointSlotsTestCase(TestBase): # The hit count should be 0 initially. self.expect("watchpoint list -v 1", substrs=['hit_count = 0']) - # Try setting a watchpoint at byteArray[1] - self.expect("watchpoint set variable byteArray[1]", error=True, - substrs=['Watchpoint creation failed']) + # debugserver on ios doesn't give an error, it creates another watchpoint, + # only expect errors on non-darwin platforms. + if not self.platformIsDarwin(): + # Try setting a watchpoint at byteArray[1] + self.expect("watchpoint set variable byteArray[1]", error=True, + substrs=['Watchpoint creation failed']) self.runCmd("process continue") @@ -90,8 +91,13 @@ class WatchpointSlotsTestCase(TestBase): # We should be stopped due to the watchpoint. # The stop reason of the thread should be watchpoint. - self.expect("thread list -v", STOPPED_DUE_TO_WATCHPOINT, - substrs=['stopped', 'stop reason = watchpoint 3']) + if self.platformIsDarwin(): + # On darwin we'll hit byteArray[3] which is watchpoint 2 + self.expect("thread list -v", STOPPED_DUE_TO_WATCHPOINT, + substrs=['stopped', 'stop reason = watchpoint 2']) + else: + self.expect("thread list -v", STOPPED_DUE_TO_WATCHPOINT, + substrs=['stopped', 'stop reason = watchpoint 3']) # Resume inferior. self.runCmd("process continue") diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py index 78273d6ec69c..0c5798fdddfe 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py @@ -18,8 +18,6 @@ class WatchpointForMultipleThreadsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -29,8 +27,6 @@ class WatchpointForMultipleThreadsTestCase(TestBase): self.setTearDownCleanup() self.hello_multiple_threads() - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py index 15657708ce46..71686a5f5c49 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py @@ -13,11 +13,6 @@ class TestStepOverWatchpoint(TestBase): mydir = TestBase.compute_mydir(__file__) - def getCategories(self): - return ['basic_process'] - - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["linux"], archs=[ @@ -29,6 +24,8 @@ class TestStepOverWatchpoint(TestBase): bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") # Read-write watchpoints not supported on SystemZ @expectedFailureAll(archs=['s390x']) + @expectedFailureAll(oslist=["ios", "watchos", "tvos", "bridgeos"], bugnumber="<rdar://problem/34027183>") # watchpoint tests aren't working on arm64 + @add_test_categories(["basic_process"]) def test(self): """Test stepping over watchpoints.""" self.build() diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py index 7a9904c53f83..82865e646be5 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py @@ -36,8 +36,6 @@ class WatchpointCommandsTestCase(TestBase): self.exe_name = self.testMethodName self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -109,8 +107,6 @@ class WatchpointCommandsTestCase(TestBase): self.expect("watchpoint list -v", substrs=['hit_count = 2']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -168,8 +164,6 @@ class WatchpointCommandsTestCase(TestBase): self.expect("process status", substrs=['exited']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -230,8 +224,6 @@ class WatchpointCommandsTestCase(TestBase): self.expect("watchpoint list -v", substrs=['hit_count = 2', 'ignore_count = 2']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -302,8 +294,6 @@ class WatchpointCommandsTestCase(TestBase): self.expect("watchpoint list -v", substrs=['hit_count = 1']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py index 5b89f14dd853..a4ceca34c086 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py @@ -33,8 +33,6 @@ class WatchpointLLDBCommandTestCase(TestBase): self.exe_name = 'a%d.out' % self.test_number self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["linux"], archs=["aarch64"], @@ -103,8 +101,6 @@ class WatchpointLLDBCommandTestCase(TestBase): self.expect("frame variable --show-globals cookie", substrs=['(int32_t)', 'cookie = 777']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["linux"], archs=["aarch64"], diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py index 16a34428ad70..50cd88bd8625 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py @@ -37,8 +37,6 @@ class WatchpointPythonCommandTestCase(TestBase): @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["linux"], archs=["aarch64"], @@ -109,8 +107,6 @@ class WatchpointPythonCommandTestCase(TestBase): @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["linux"], archs=["aarch64"], diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py index 5a16856149ba..34502a6d1d36 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py @@ -33,8 +33,6 @@ class WatchpointConditionCmdTestCase(TestBase): self.exe_name = self.testMethodName self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["linux"], archs=["aarch64"], diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py index aac001e9db5a..dad633f052c6 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py @@ -16,8 +16,6 @@ class TestWatchpointSetEnable(TestBase): # Call super's setUp(). TestBase.setUp(self) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -26,7 +24,6 @@ class TestWatchpointSetEnable(TestBase): self.build() self.do_test(False) - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py index 02180a127a8e..ea2580382520 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py @@ -22,8 +22,6 @@ class TestWatchpointEvents (TestBase): self.main_source = "main.c" @add_test_categories(['pyapi']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["linux"], archs=["aarch64"], diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py index 3f301fd9f1a9..ee4b05c12659 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py @@ -17,8 +17,6 @@ class TestValueOfVectorVariableTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py index 1a94276c58e8..b53e323cf4bd 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py @@ -30,8 +30,6 @@ class WatchLocationUsingWatchpointSetTestCase(TestBase): # Build dictionary to have unique executable names for each test # method. - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["linux"], archs=[ diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py index e342e34667fe..ee6402489330 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py @@ -31,8 +31,6 @@ class WatchpointSizeTestCase(TestBase): self.exe_name = 'a.out' self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -42,8 +40,6 @@ class WatchpointSizeTestCase(TestBase): """Test to selectively watch different bytes in a 8-byte array.""" self.run_watchpoint_size_test('byteArray', 8, '1') - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -53,8 +49,6 @@ class WatchpointSizeTestCase(TestBase): """Test to selectively watch different words in an 8-byte word array.""" self.run_watchpoint_size_test('wordArray', 4, '2') - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") diff --git a/packages/Python/lldbsuite/test/help/TestHelp.py b/packages/Python/lldbsuite/test/help/TestHelp.py index 21eeb0bf63a1..2b89b49a6229 100644 --- a/packages/Python/lldbsuite/test/help/TestHelp.py +++ b/packages/Python/lldbsuite/test/help/TestHelp.py @@ -230,3 +230,12 @@ class HelpCommandTestCase(TestBase): 'command alias --long-help "I am a very friendly alias" -- averyfriendlyalias help') self.expect("help averyfriendlyalias", matching=True, substrs=['I am a very friendly alias']) + @no_debug_info_test + def test_help_format_output(self): + """Test that help output reaches TerminalWidth.""" + self.runCmd( + 'settings set term-width 108') + self.expect( + "help format", + matching=True, + substrs=['<format> -- One of the format names']) diff --git a/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py b/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py index f54202edade3..dd4da061fdcf 100644 --- a/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py +++ b/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py @@ -22,12 +22,6 @@ class GlobalVariablesTestCase(TestBase): self.shlib_names = ["a"] @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764") - @expectedFailureAll( - "llvm.org/pr25872, <rdar://problem/28725399>", - oslist=["macosx"], - debug_info=[ - "dwarf", - "gmodules"]) def test_c_global_variables(self): """Test 'frame variable --scope --no-args' which omits args and shows scopes.""" self.build() diff --git a/packages/Python/lldbsuite/test/lang/c/inlines/main.c b/packages/Python/lldbsuite/test/lang/c/inlines/main.c index f45e4e2b1497..415f97aedbd4 100644 --- a/packages/Python/lldbsuite/test/lang/c/inlines/main.c +++ b/packages/Python/lldbsuite/test/lang/c/inlines/main.c @@ -14,7 +14,7 @@ void test2(int b) { void test1(int a) { printf("test1(%d)\n", a); - test2(a+1);//% self.dbg.HandleCommand("step") + test2(a+1);//% self.runCmd("step") //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["24"]) } diff --git a/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py b/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py index edc83bf58985..5505d15854d1 100644 --- a/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py +++ b/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py @@ -5,6 +5,7 @@ from __future__ import print_function import unittest2 import lldb +from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil @@ -34,10 +35,12 @@ class SharedLibTestCase(TestBase): "expression GetMeASubFoo(my_foo_ptr)", startstr="(sub_foo *) $") + @expectedFailureAll(oslist=["windows"]) def test_expr(self): """Test that types work when defined in a shared library and forward-declared in the main executable""" self.common_test_expr(True) + @expectedFailureAll(oslist=["windows"]) def test_expr_no_preload(self): """Test that types work when defined in a shared library and forward-declared in the main executable, but with preloading disabled""" self.common_test_expr(False) diff --git a/packages/Python/lldbsuite/test/lang/c/step-target/.categories b/packages/Python/lldbsuite/test/lang/c/step-target/.categories new file mode 100644 index 000000000000..c00c25822e4c --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/c/step-target/.categories @@ -0,0 +1 @@ +basic_process diff --git a/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py b/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py index b1aa98c50ba4..90f07860afa7 100644 --- a/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py +++ b/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py @@ -14,9 +14,6 @@ class TestStepTarget(TestBase): mydir = TestBase.compute_mydir(__file__) - def getCategories(self): - return ['basic_process'] - def setUp(self): # Call super's setUp(). TestBase.setUp(self) diff --git a/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py b/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py index d693e1dada51..e1916a550a12 100644 --- a/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py +++ b/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py @@ -15,16 +15,13 @@ class TestCStepping(TestBase): mydir = TestBase.compute_mydir(__file__) - def getCategories(self): - return ['basic_process'] - def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line numbers that we will step to in main: self.main_source = "main.c" - @add_test_categories(['pyapi']) + @add_test_categories(['pyapi', 'basic_process']) @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr17932') @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr14437") @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24777") diff --git a/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py b/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py index c6952d4d904a..4388d95840eb 100644 --- a/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py +++ b/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py @@ -49,7 +49,9 @@ class TlsGlobalTestCase(TestBase): """Test thread-local storage.""" self.build() exe = os.path.join(os.getcwd(), "a.out") - self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) + target = self.dbg.CreateTarget(exe) + if self.platformIsDarwin(): + self.registerSharedLibrariesWithTarget(target, ['liba.dylib']) line1 = line_number('main.c', '// thread breakpoint') lldbutil.run_break_set_by_file_and_line( diff --git a/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile b/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile index 194af7b32398..314f1cb2f077 100644 --- a/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile +++ b/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile @@ -2,6 +2,4 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp -CFLAGS_EXTRAS += $(NO_LIMIT_DEBUG_INFO_FLAGS) - include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py b/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py index e8d3284f6098..82e44fb1759f 100644 --- a/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py +++ b/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py @@ -99,8 +99,8 @@ class CPP11EnumTypesTestCase(TestBase): # Look up information about the 'DayType' enum type. # Check for correct display. self.expect("image lookup -t DayType", DATA_TYPES_DISPLAYED_CORRECTLY, - substrs=['enum DayType {', - 'Monday', + patterns=['enum( struct| class) DayType {'], + substrs=['Monday', 'Tuesday', 'Wednesday', 'Thursday', diff --git a/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py b/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py index fb7fadffa783..fd19de7086da 100644 --- a/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py +++ b/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py @@ -11,7 +11,6 @@ class TestCppNsImport(TestBase): mydir = TestBase.compute_mydir(__file__) - @expectedFailureAll(oslist=['freebsd'], bugnumber="llvm.org/pr25925") def test_with_run_command(self): """Tests imported namespaces in C++.""" self.build() diff --git a/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py b/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py index ce270b1ea391..d5ff93f0cc1f 100644 --- a/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py +++ b/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py @@ -15,11 +15,6 @@ class TestCppScopes(TestBase): def test_all_but_c(self): self.do_test(False) - # There's a global symbol in libsystem on Darwin that messes up - # the lookup of class C. Breaking that test out from the others - # since that is a odd failure, and I don't want it to mask the - # real purpose of this test. - @expectedFailureDarwin(bugnumber="<rdar://problem/28623427>") @expectedFailureAll(oslist=["windows"]) def test_c(self): self.do_test(True) diff --git a/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile b/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile index f61a6300a994..fe27980afe9b 100644 --- a/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile +++ b/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile @@ -5,11 +5,4 @@ CFLAGS := -g -O0 clean: OBJECTS+=$(wildcard main.d.*) -# 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/lang/cpp/template/Makefile b/packages/Python/lldbsuite/test/lang/cpp/template/Makefile index 194af7b32398..314f1cb2f077 100644 --- a/packages/Python/lldbsuite/test/lang/cpp/template/Makefile +++ b/packages/Python/lldbsuite/test/lang/cpp/template/Makefile @@ -2,6 +2,4 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp -CFLAGS_EXTRAS += $(NO_LIMIT_DEBUG_INFO_FLAGS) - include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile index 3d24348618da..2d6de6f1514b 100644 --- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile +++ b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile @@ -1,6 +1,20 @@ LEVEL = ../../../make -CFLAGS = -g -O0 +CC ?= clang +ifeq "$(ARCH)" "" + ARCH = x86_64 +endif + +ifeq "$(OS)" "" + OS = $(shell uname -s) +endif + +CFLAGS ?= -g -O0 + +ifeq "$(OS)" "Darwin" + CFLAGS += -arch $(ARCH) +endif + LDFLAGS = $(CFLAGS) -lobjc -framework Foundation all: a.out libTest.dylib libTestExt.dylib diff --git a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py index 564a1e15c06c..df3a41fedf60 100644 --- a/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py +++ b/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py @@ -21,6 +21,7 @@ class TestRealDefinition(TestBase): if self.getArchitecture() == 'i386': self.skipTest("requires modern objc runtime") self.build() + self.shlib_names = ["libTestExt.dylib", "libTest.dylib"] self.common_setup() line = line_number('TestExt/TestExt.m', '// break here') @@ -46,4 +47,7 @@ class TestRealDefinition(TestBase): def common_setup(self): exe = os.path.join(os.getcwd(), "a.out") + target = self.dbg.CreateTarget(exe) + self.registerSharedLibrariesWithTarget(target, self.shlib_names) + self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) diff --git a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile index 329ceabeea97..bd940ab148c9 100644 --- a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile +++ b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile @@ -1,12 +1,28 @@ LEVEL = ../../../make -myclass.o: myclass.h myclass.m - $(CC) myclass.m -c -o myclass.o +CC ?= clang +ifeq "$(ARCH)" "" + ARCH = x86_64 +endif -repro: myclass.o repro.m - $(CC) -g -O0 myclass.o repro.m -framework Foundation +ifeq "$(OS)" "" + OS = $(shell uname -s) +endif -cleanup: - rm -r myclass.o +CFLAGS ?= -g -O0 +CFLAGS_NO_DEBUG = +ifeq "$(OS)" "Darwin" + CFLAGS += -arch $(ARCH) + CFLAGS_NO_DEBUG += -arch $(ARCH) +endif + +all: aout + +aout: + $(CC) $(CFLAGS_NO_DEBUG) myclass.m -c -o myclass.o + $(CC) $(CFLAGS) myclass.o repro.m -framework Foundation + +clean:: + rm -f myclass.o include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py index 79b7ee5dbfb0..d29476727bd6 100644 --- a/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py +++ b/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py @@ -30,15 +30,11 @@ class ObjCiVarIMPTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin + @skipIf(archs=['i386']) # objc file does not build for i386 @no_debug_info_test def test_imp_ivar_type(self): """Test that dynamically discovered ivars of type IMP do not crash LLDB""" - execute_command("make repro") - - def cleanup(): - execute_command("make cleanup") - self.addTearDownHook(cleanup) - + self.build() exe = os.path.join(os.getcwd(), "a.out") # Create a target from the debugger. diff --git a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py index 2904621a416c..328335dfe2c9 100644 --- a/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py +++ b/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py @@ -28,7 +28,6 @@ class ModulesInlineFunctionsTestCase(TestBase): @skipUnlessDarwin @skipIf(macos_version=["<", "10.12"]) - @expectedFailureDarwin("llvm.org/pr25743") def test_expr(self): self.build() exe = os.path.join(os.getcwd(), "a.out") diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py index 50ed2992ee79..562c0cfc1e7a 100644 --- a/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py +++ b/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py @@ -60,5 +60,9 @@ class TestObjCClassMethod(TestBase): cmd_value = frame.EvaluateExpression( "(int)[Foo doSomethingWithString:@\"Hello\"]") + if self.TraceOn(): + if cmd_value.IsValid(): + print("cmd_value is valid") + print("cmd_value has the value %d" % cmd_value.GetValueAsUnsigned()) self.assertTrue(cmd_value.IsValid()) self.assertTrue(cmd_value.GetValueAsUnsigned() == 5) diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py b/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py index 96c5a33f14b0..84b12579166d 100644 --- a/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py +++ b/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py @@ -47,12 +47,6 @@ class ObjCNewSyntaxTestCase(TestBase): substrs=[' resolved, hit count = 1']) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_read_array(self): @@ -69,12 +63,6 @@ class ObjCNewSyntaxTestCase(TestBase): substrs=["foo"]) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_update_array(self): @@ -91,12 +79,6 @@ class ObjCNewSyntaxTestCase(TestBase): substrs=["bar"]) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_read_dictionary(self): @@ -113,12 +95,6 @@ class ObjCNewSyntaxTestCase(TestBase): substrs=["value"]) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_update_dictionary(self): @@ -135,12 +111,6 @@ class ObjCNewSyntaxTestCase(TestBase): substrs=["object"]) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_array_literal(self): @@ -155,12 +125,6 @@ class ObjCNewSyntaxTestCase(TestBase): "bar"]) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_dictionary_literal(self): @@ -174,12 +138,6 @@ class ObjCNewSyntaxTestCase(TestBase): "object"]) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_char_literal(self): @@ -189,12 +147,6 @@ class ObjCNewSyntaxTestCase(TestBase): VARIABLES_DISPLAYED_CORRECTLY, substrs=[str(ord('a'))]) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_integer_literals(self): @@ -226,12 +178,6 @@ class ObjCNewSyntaxTestCase(TestBase): substrs=["1"]) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_float_literal(self): @@ -241,12 +187,6 @@ class ObjCNewSyntaxTestCase(TestBase): substrs=["NSNumber", "123.45"]) @skipUnlessDarwin - @expectedFailureAll( - oslist=['macosx'], - compiler='clang', - compiler_version=[ - '<', - '7.0.0']) @skipIf(macos_version=["<", "10.12"]) @expectedFailureAll(archs=["i[3-6]86"]) def test_expressions_in_literals(self): diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py b/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py index 8516ef3281ff..95eb6e5a212d 100644 --- a/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py +++ b/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py @@ -13,9 +13,6 @@ from lldbsuite.test import lldbutil class TestObjCStepping(TestBase): - def getCategories(self): - return ['basic_process'] - mydir = TestBase.compute_mydir(__file__) def setUp(self): @@ -35,7 +32,7 @@ class TestObjCStepping(TestBase): self.main_source, '// Step over nil should stop here.') @skipUnlessDarwin - @add_test_categories(['pyapi']) + @add_test_categories(['pyapi', 'basic_process']) def test_with_python_api(self): """Test stepping through ObjC method dispatch in various forms.""" self.build() @@ -162,6 +159,7 @@ class TestObjCStepping(TestBase): newClassName = mySource_isa.GetSummary() if self.TraceOn(): + print("className is %s, newClassName is %s" % (className, newClassName)) print(mySource_isa) self.assertTrue( diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py b/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py index 75f726340ef7..650923a729e4 100644 --- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py +++ b/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py @@ -25,6 +25,7 @@ class TestObjCStructArgument(TestBase): @skipUnlessDarwin @add_test_categories(['pyapi']) + @skipIf(debug_info=no_match(["gmodules"]), oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'arm64']) # this test program only builds for ios with -gmodules def test_with_python_api(self): """Test passing structs to Objective-C methods.""" self.build() diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m b/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m index f013c5602395..337ab3408ce2 100644 --- a/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m +++ b/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m @@ -1,4 +1,10 @@ #import <Foundation/Foundation.h> +#include <TargetConditionals.h> + +#if TARGET_OS_IPHONE +@import CoreGraphics; +typedef CGRect NSRect; +#endif struct things_to_sum { int a; diff --git a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py b/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py index 26afe71d1de9..d1956d46e7b6 100644 --- a/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py +++ b/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py @@ -46,13 +46,13 @@ class Rdar10967107TestCase(TestBase): self.runCmd("run", RUN_SUCCEEDED) # check that we correctly see the const char*, even with dynamic types # on - self.expect("frame variable my_string", substrs=['const char *']) + self.expect("frame variable -raw-output my_string", substrs=['const char *']) self.expect( - "frame variable my_string --dynamic-type run-target", + "frame variable my_string --raw-output --dynamic-type run-target", substrs=['const char *']) # check that expr also gets it right - self.expect("expr my_string", substrs=['const char *']) - self.expect("expr -d run -- my_string", substrs=['const char *']) + self.expect("e -R -- my_string", substrs=['const char *']) + self.expect("expr -R -d run -- my_string", substrs=['const char *']) # but check that we get the real Foolie as such self.expect("frame variable my_foolie", substrs=['FoolMeOnce *']) self.expect( diff --git a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py index 97b137818a07..54011db1a120 100644 --- a/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py +++ b/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py @@ -27,6 +27,7 @@ class ObjCSingleEntryDictionaryTestCase(TestBase): self.line = line_number('main.m', '// break here') @skipUnlessDarwin + @expectedFailureAll(oslist=['watchos'], bugnumber="rdar://problem/34642736") # bug in NSDictionary formatting on watchos def test_single_entry_dict(self): self.build() exe = os.path.join(os.getcwd(), "a.out") diff --git a/packages/Python/lldbsuite/test/linux/add-symbols/Makefile b/packages/Python/lldbsuite/test/linux/add-symbols/Makefile new file mode 100644 index 000000000000..c701797f0a7d --- /dev/null +++ b/packages/Python/lldbsuite/test/linux/add-symbols/Makefile @@ -0,0 +1,12 @@ +LEVEL = ../../make +CXX_SOURCES := main.cpp +LD_EXTRAS += -Wl,--build-id=none + +localall : stripped.out all +stripped.out : a.out + $(OBJCOPY) --remove-section=.note.gnu.build-id --remove-section=.gnu_debuglink --strip-debug a.out stripped.out + +clean:: + $(RM) stripped.out + +include $(LEVEL)/Makefile.rules
\ No newline at end of file diff --git a/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py b/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py new file mode 100644 index 000000000000..477ddf9c15b1 --- /dev/null +++ b/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py @@ -0,0 +1,52 @@ +""" Testing explicit symbol loading via target symbols add. """ +import os +import time +import lldb +import sys +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TargetSymbolsAddCommand(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + def setUp(self): + TestBase.setUp(self) + self.source = 'main.c' + + @no_debug_info_test # Prevent the genaration of the dwarf version of this test + @skipUnlessPlatform(['linux']) + def test_target_symbols_add(self): + """Test that 'target symbols add' can load the symbols + even if gnu.build-id and gnu_debuglink are not present in the module. + Similar to test_add_dsym_mid_execution test for macos.""" + self.build(clean=True) + exe = os.path.join(os.getcwd(), "stripped.out") + + self.target = self.dbg.CreateTarget(exe) + self.assertTrue(self.target, VALID_TARGET) + + main_bp = self.target.BreakpointCreateByName("main", "stripped.out") + self.assertTrue(main_bp, VALID_BREAKPOINT) + + self.process = self.target.LaunchSimple( + None, None, self.get_process_working_directory()) + self.assertTrue(self.process, PROCESS_IS_VALID) + + # The stop reason of the thread should be breakpoint. + self.assertTrue(self.process.GetState() == lldb.eStateStopped, + STOPPED_DUE_TO_BREAKPOINT) + + exe_module = self.target.GetModuleAtIndex(0) + + # Check that symbols are not loaded and main.c is not know to be + # the source file. + self.expect("frame select", substrs=['main.c'], matching=False) + + # Tell LLDB that a.out has symbols for stripped.out + self.runCmd("target symbols add -s stripped.out a.out") + + # Check that symbols are now loaded and main.c is in the output. + self.expect("frame select", substrs=['main.c']) diff --git a/packages/Python/lldbsuite/test/linux/add-symbols/main.c b/packages/Python/lldbsuite/test/linux/add-symbols/main.c new file mode 100644 index 000000000000..5a0915746b74 --- /dev/null +++ b/packages/Python/lldbsuite/test/linux/add-symbols/main.c @@ -0,0 +1,6 @@ +#include <stdio.h> +static int var = 5; +int main() { + printf("%p is %d\n", &var, var); + return ++var; +} diff --git a/packages/Python/lldbsuite/test/lldbinline.py b/packages/Python/lldbsuite/test/lldbinline.py index 727e69d412a2..70a0dda5343b 100644 --- a/packages/Python/lldbsuite/test/lldbinline.py +++ b/packages/Python/lldbsuite/test/lldbinline.py @@ -134,25 +134,28 @@ class InlineTest(TestBase): makefile.flush() makefile.close() - @skipUnlessDarwin + @add_test_categories(["dsym"]) def __test_with_dsym(self): self.using_dsym = True self.BuildMakefile() self.buildDsym() self.do_test() + @add_test_categories(["dwarf"]) def __test_with_dwarf(self): self.using_dsym = False self.BuildMakefile() self.buildDwarf() self.do_test() + @add_test_categories(["dwo"]) def __test_with_dwo(self): self.using_dsym = False self.BuildMakefile() self.buildDwo() self.do_test() + @add_test_categories(["gmodules"]) def __test_with_gmodules(self): self.using_dsym = False self.BuildMakefile() diff --git a/packages/Python/lldbsuite/test/lldbplatform.py b/packages/Python/lldbsuite/test/lldbplatform.py index 84c027d88ff4..23d93e19d948 100644 --- a/packages/Python/lldbsuite/test/lldbplatform.py +++ b/packages/Python/lldbsuite/test/lldbplatform.py @@ -12,8 +12,8 @@ import six import use_lldb_suite import lldb -windows, linux, macosx, darwin, ios, darwin_all, freebsd, netbsd, bsd_all, android = range( - 10) +windows, linux, macosx, darwin, ios, tvos, watchos, bridgeos, darwin_all, darwin_embedded, freebsd, netbsd, bsd_all, android = range( + 14) __name_lookup = { windows: ["windows"], @@ -21,7 +21,11 @@ __name_lookup = { macosx: ["macosx"], darwin: ["darwin"], ios: ["ios"], - darwin_all: ["macosx", "darwin", "ios"], + tvos: ["tvos"], + watchos: ["watchos"], + bridgeos: ["bridgeos"], + darwin_all: ["macosx", "darwin", "ios", "tvos", "watchos", "bridgeos"], + darwin_embedded: ["ios", "tvos", "watchos", "bridgeos"], freebsd: ["freebsd"], netbsd: ["netbsd"], bsd_all: ["freebsd", "netbsd"], diff --git a/packages/Python/lldbsuite/test/lldbplatformutil.py b/packages/Python/lldbsuite/test/lldbplatformutil.py index 4f45643241ed..f7da58bd5259 100644 --- a/packages/Python/lldbsuite/test/lldbplatformutil.py +++ b/packages/Python/lldbsuite/test/lldbplatformutil.py @@ -25,9 +25,9 @@ def check_first_register_readable(test_case): if arch in ['x86_64', 'i386']: test_case.expect("register read eax", substrs=['eax = 0x']) - elif arch in ['arm']: + elif arch in ['arm', 'armv7', 'armv7k']: test_case.expect("register read r0", substrs=['r0 = 0x']) - elif arch in ['aarch64']: + elif arch in ['aarch64', 'arm64']: test_case.expect("register read x0", substrs=['x0 = 0x']) elif re.match("mips", arch): test_case.expect("register read zero", substrs=['zero = 0x']) @@ -100,8 +100,7 @@ def finalize_build_dictionary(dictionary): if dictionary is None: dictionary = {} dictionary["OS"] = "Android" - if android_device_api() >= 16: - dictionary["PIE"] = 1 + dictionary["PIE"] = 1 return dictionary @@ -123,7 +122,7 @@ def getHostPlatform(): def getDarwinOSTriples(): - return ['darwin', 'macosx', 'ios'] + return ['darwin', 'macosx', 'ios', 'watchos', 'tvos', 'bridgeos'] def getPlatform(): @@ -175,6 +174,6 @@ def createPlatformContext(): def hasChattyStderr(test_case): """Some targets produce garbage on the standard error output. This utility function determines whether the tests can be strict about the expected stderr contents.""" - if match_android_device(test_case.getArchitecture(), ['aarch64'], [22]): + if match_android_device(test_case.getArchitecture(), ['aarch64'], range(22, 25+1)): return True # The dynamic linker on the device will complain about unknown DT entries return False diff --git a/packages/Python/lldbsuite/test/lldbtest.py b/packages/Python/lldbsuite/test/lldbtest.py index f1d65cf2076d..ecc38f355436 100644 --- a/packages/Python/lldbsuite/test/lldbtest.py +++ b/packages/Python/lldbsuite/test/lldbtest.py @@ -706,7 +706,7 @@ class Base(unittest2.TestCase): # This function removes all files from the current working directory while leaving # the directories in place. The cleaup is required to reduce the disk space required - # by the test suit while leaving the directories untached is neccessary because + # by the test suite while leaving the directories untouched is neccessary because # sub-directories might belong to an other test def clean_working_directory(): # TODO: Make it working on Windows when we need it for remote debugging support @@ -1371,10 +1371,9 @@ class Base(unittest2.TestCase): self.dumpSessionInfo().""" arch = self.getArchitecture() comp = self.getCompiler() + option_str = "" if arch: option_str = "-A " + arch - else: - option_str = "" if comp: option_str += " -C " + comp return option_str @@ -1511,6 +1510,7 @@ class Base(unittest2.TestCase): clean=True): """Platform specific way to build binaries with dsym info.""" module = builder_module() + dictionary = lldbplatformutil.finalize_build_dictionary(dictionary) if not module.buildDsym( self, architecture, @@ -1561,6 +1561,7 @@ class Base(unittest2.TestCase): clean=True): """Platform specific way to build binaries with gmodules info.""" module = builder_module() + dictionary = lldbplatformutil.finalize_build_dictionary(dictionary) if not module.buildGModules( self, architecture, @@ -1833,30 +1834,6 @@ class TestBase(Base): # Can be overridden by the LLDB_TIME_WAIT_NEXT_LAUNCH environment variable. timeWaitNextLaunch = 1.0 - # Returns the list of categories to which this test case belongs - # by default, look for a ".categories" file, and read its contents - # if no such file exists, traverse the hierarchy - we guarantee - # a .categories to exist at the top level directory so we do not end up - # looping endlessly - subclasses are free to define their own categories - # in whatever way makes sense to them - def getCategories(self): - import inspect - import os.path - folder = inspect.getfile(self.__class__) - folder = os.path.dirname(folder) - while folder != '/': - categories_file_name = os.path.join(folder, ".categories") - if os.path.exists(categories_file_name): - categories_file = open(categories_file_name, 'r') - categories = categories_file.readline() - categories_file.close() - categories = str.replace(categories, '\n', '') - categories = str.replace(categories, '\r', '') - return categories.split(',') - else: - folder = os.path.dirname(folder) - continue - def generateSource(self, source): template = source + '.template' temp = os.path.join(os.getcwd(), template) diff --git a/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile b/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile index 4e4aa71de2a2..3a363ab98c17 100644 --- a/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile +++ b/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile @@ -1,9 +1,22 @@ CC ?= clang +ifeq "$(ARCH)" "" + ARCH = x86_64 +endif + +ifeq "$(OS)" "" + OS = $(shell uname -s) +endif + +CFLAGS ?= -g -O0 + +ifeq "$(OS)" "Darwin" + CFLAGS += -arch $(ARCH) +endif all: clean mkdir hide.app mkdir hide.app/Contents - $(CC) -g main.c + $(CC) $(CFLAGS) -g main.c mv a.out.dSYM hide.app/Contents strip -x a.out diff --git a/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py b/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py index e717e2ecdd90..afca8bcc0ded 100644 --- a/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py +++ b/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py @@ -31,6 +31,11 @@ class TestIndirectFunctions(TestBase): target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) + if self.platformIsDarwin(): + lib1 = os.path.join(os.getcwd(), 'libindirect.dylib') + lib2 = os.path.join(os.getcwd(), 'libreexport.dylib') + self.registerSharedLibrariesWithTarget(target, [lib1, lib2]) + self.main_source_spec = lldb.SBFileSpec(self.main_source) break1 = target.BreakpointCreateBySourceRegex( diff --git a/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py b/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py index 1e9596785f95..c2a27c570898 100644 --- a/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py +++ b/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py @@ -14,17 +14,19 @@ import platform import re import sys -from lldbsuite.test import decorators +from lldbsuite.test.decorators import * from lldbsuite.test import lldbtest from lldbsuite.test import lldbtest_config -@decorators.skipUnlessDarwin class DarwinNSLogOutputTestCase(lldbtest.TestBase): NO_DEBUG_INFO_TESTCASE = True mydir = lldbtest.TestBase.compute_mydir(__file__) + @skipUnlessDarwin + @skipIfRemote # this test is currently written using lldb commands & assumes running on local system + def setUp(self): # Call super's setUp(). super(DarwinNSLogOutputTestCase, self).setUp() diff --git a/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py b/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py index eae4ae2e42a3..8eabe9a76637 100644 --- a/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py +++ b/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py @@ -18,7 +18,6 @@ class TestQueues(TestBase): @skipUnlessDarwin @add_test_categories(['pyapi']) - @expectedFailureAll(bugnumber="rdar://30915340") def test_with_python_api(self): """Test queues inspection SB APIs.""" self.build() @@ -231,8 +230,9 @@ class TestQueues(TestBase): "requested_qos.printable_name", stream), "Get QoS printable string for unspecified QoS thread") + qosName = stream.GetData() self.assertTrue( - stream.GetData() == "User Initiated", + qosName == "User Initiated" or qosName == "Default", "unspecified QoS thread name is valid") stream.Clear() self.assertTrue( diff --git a/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py b/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py index b6612b26bde6..ae2916c92de9 100644 --- a/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py +++ b/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py @@ -70,7 +70,14 @@ class TestInterruptThreadNames(TestBase): inferior_set_up = lldb.SBValue() retry = 5 while retry > 0: - time.sleep(1) + arch = self.getArchitecture() + # when running the testsuite against a remote arm device, it may take + # a little longer for the process to start up. Use a "can't possibly take + # longer than this" value. + if arch == 'arm64' or arch == 'armv7': + time.sleep(10) + else: + time.sleep(1) process.SendAsyncInterrupt() self.assertTrue(self.wait_for_stop(process, listener), "Check that process is paused") inferior_set_up = process.GetTarget().CreateValueFromExpression("threads_up_and_running", "threads_up_and_running") diff --git a/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py b/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py index 988611935c1e..9a690e3ebb0b 100644 --- a/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py +++ b/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py @@ -26,6 +26,7 @@ class UniversalTestCase(TestBase): @skipUnlessDarwin @unittest2.skipUnless(hasattr(os, "uname") and os.uname()[4] in [ 'i386', 'x86_64'], "requires i386 or x86_64") + @skipIfDarwinEmbedded # this test file assumes we're targetting an x86 system def test_sbdebugger_create_target_with_file_and_target_triple(self): """Test the SBDebugger.CreateTargetWithFileAndTargetTriple() API.""" # Invoke the default build rule. @@ -47,6 +48,7 @@ class UniversalTestCase(TestBase): @skipUnlessDarwin @unittest2.skipUnless(hasattr(os, "uname") and os.uname()[4] in [ 'i386', 'x86_64'], "requires i386 or x86_64") + @skipIfDarwinEmbedded # this test file assumes we're targetting an x86 system def test_process_launch_for_universal(self): """Test process launch of a universal binary.""" from lldbsuite.test.lldbutil import print_registers @@ -117,6 +119,7 @@ class UniversalTestCase(TestBase): @skipUnlessDarwin @unittest2.skipUnless(hasattr(os, "uname") and os.uname()[4] in [ 'i386', 'x86_64'], "requires i386 or x86_64") + @skipIfDarwinEmbedded # this test file assumes we're targetting an x86 system def test_process_attach_with_wrong_arch(self): """Test that when we attach to a binary from the wrong fork of a universal binary, we fix up the ABI correctly.""" # Now keep the architecture at 32 bit, but switch the binary we launch to diff --git a/packages/Python/lldbsuite/test/make/Android.rules b/packages/Python/lldbsuite/test/make/Android.rules index 058401f425ad..f7b8e2459611 100644 --- a/packages/Python/lldbsuite/test/make/Android.rules +++ b/packages/Python/lldbsuite/test/make/Android.rules @@ -8,7 +8,7 @@ else ifeq "$(ARCH)" "i386" API_LEVEL := 17 else # lowest supported 32-bit API level - API_LEVEL := 9 + API_LEVEL := 16 endif ifeq "$(ARCH)" "arm" @@ -18,8 +18,8 @@ ifeq "$(ARCH)" "arm" ARCH_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm else ifeq "$(ARCH)" "aarch64" SYSROOT_ARCH := arm64 - TRIPLE := aarch64-none-linux-android STL_ARCH := arm64-v8a + TRIPLE := aarch64-none-linux-android else ifeq "$(ARCH)" "i386" SYSROOT_ARCH := x86 STL_ARCH := x86 @@ -70,7 +70,9 @@ ifeq "$(findstring clang,$(CC))" "clang" ARCH_LDFLAGS += -target $(TRIPLE) -gcc-toolchain $(GCC_TOOLCHAIN) endif -ARCH_CFLAGS += --sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH) +ARCH_CFLAGS += --sysroot=$(NDK_ROOT)/sysroot \ + -isystem $(NDK_ROOT)/sysroot/usr/include/$(TOOL_PREFIX) \ + -D__ANDROID_API__=$(API_LEVEL) ARCH_LDFLAGS += --sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH) -lm ifeq (1,$(USE_LIBCPP)) diff --git a/packages/Python/lldbsuite/test/make/Makefile.rules b/packages/Python/lldbsuite/test/make/Makefile.rules index a7b94ef57380..4870cd95f80a 100644 --- a/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/packages/Python/lldbsuite/test/make/Makefile.rules @@ -78,6 +78,24 @@ ifneq "$(TRIPLE)" "" endif endif endif + ifeq "$(TRIPLE_OS)" "watchos" + ifeq "$(SDKROOT)" "" + # Set SDKROOT if it wasn't set + ifneq (,$(findstring arm,$(ARCH))) + SDKROOT = $(shell xcrun --sdk watchos --show-sdk-path) + ifeq "$(TRIPLE_VERSION)" "" + TRIPLE_VERSION =$(shell echo $(notdir $(SDKROOT)) | sed -e 's/.*\([0-9]\.[0-9]\).*/\1/') + endif + ARCH_CFLAGS :=-mwatchos-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)" + else + SDKROOT = $(shell xcrun --sdk watchsimulator --show-sdk-path) + ifeq "$(TRIPLE_VERSION)" "" + TRIPLE_VERSION =$(shell echo $(notdir $(SDKROOT)) | sed -e 's/.*\([0-9]\.[0-9]\).*/\1/') + endif + ARCH_CFLAGS :=-mwatchos-simulator-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)" + endif + endif + endif endif endif ifeq "$(OS)" "Android" @@ -163,6 +181,9 @@ else ifeq "$(ARCH)" "powerpc64" override ARCH := $(subst powerpc64,64,$(ARCH)) endif + ifeq "$(ARCH)" "powerpc64le" + override ARCH := $(subst powerpc64le,64,$(ARCH)) + endif ifeq "$(ARCH)" "aarch64" override ARCH := override ARCHFLAG := @@ -197,18 +218,19 @@ DEBUG_INFO_FLAG ?= -g CFLAGS ?= $(DEBUG_INFO_FLAG) -O0 -fno-builtin ifeq "$(OS)" "Darwin" - CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include + CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) -I$(LLDB_BASE_DIR)include else - CFLAGS += $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include + CFLAGS += $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) -I$(LLDB_BASE_DIR)include endif -CFLAGS += -include $(THIS_FILE_DIR)test_common.h -I$(THIS_FILE_DIR) $(ARCH_CFLAGS) +CFLAGS += -include $(THIS_FILE_DIR)test_common.h -I$(THIS_FILE_DIR) +CFLAGS += $(NO_LIMIT_DEBUG_INFO_FLAGS) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS) # Use this one if you want to build one part of the result without debug information: ifeq "$(OS)" "Darwin" - CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) $(ARCH_CFLAGS) + CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS) else - CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) $(ARCH_CFLAGS) + CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS) endif ifeq "$(MAKE_DWO)" "YES" @@ -225,7 +247,7 @@ CXXFLAGS += $(subst -fmodules,, $(CFLAGS)) LD = $(CC) LDFLAGS ?= $(CFLAGS) LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS) -ifeq (,$(filter $(OS), Windows_NT Android)) +ifeq (,$(filter $(OS), Windows_NT Android Darwin)) ifneq (,$(filter YES,$(ENABLE_THREADS))) LDFLAGS += -pthread endif diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py index 4739df000853..5c0c7bbd766a 100644 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py +++ b/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py @@ -73,6 +73,17 @@ class APIDefaultConstructorTestCase(TestBase): @add_test_categories(['pyapi']) @no_debug_info_test + def test_SBBreakpointName(self): + obj = lldb.SBBreakpointName() + if self.TraceOn(): + print(obj) + self.assertFalse(obj) + # Do fuzz testing on the invalid obj, it should not crash lldb. + import sb_breakpointname + sb_breakpointname.fuzz_obj(obj) + + @add_test_categories(['pyapi']) + @no_debug_info_test def test_SBBroadcaster(self): obj = lldb.SBBroadcaster() if self.TraceOn(): @@ -255,6 +266,17 @@ class APIDefaultConstructorTestCase(TestBase): @add_test_categories(['pyapi']) @no_debug_info_test + def test_SBProcessInfo(self): + obj = lldb.SBProcessInfo() + if self.TraceOn(): + print(obj) + self.assertFalse(obj) + # Do fuzz testing on the invalid obj, it should not crash lldb. + import sb_process_info + sb_process_info.fuzz_obj(obj) + + @add_test_categories(['pyapi']) + @no_debug_info_test def test_SBSection(self): obj = lldb.SBSection() if self.TraceOn(): diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py new file mode 100644 index 000000000000..56016c05c313 --- /dev/null +++ b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py @@ -0,0 +1,42 @@ +""" +Fuzz tests an object after the default construction to make sure it does not crash lldb. +""" + +import sys +import lldb + + +def fuzz_obj(obj): + obj.IsValid() + obj.GetName() + obj.SetEnabled(True) + obj.IsEnabled() + obj.SetOneShot(True) + obj.IsOneShot() + obj.SetIgnoreCount(1) + obj.GetIgnoreCount() + obj.SetCondition("1 == 2") + obj.GetCondition() + obj.SetAutoContinue(False) + obj.GetAutoContinue() + obj.SetThreadID(0x1234) + obj.GetThreadID() + obj.SetThreadIndex(10) + obj.GetThreadIndex() + obj.SetThreadName("AThread") + obj.GetThreadName() + obj.SetQueueName("AQueue") + obj.GetQueueName() + obj.SetScriptCallbackFunction("AFunction") + commands = lldb.SBStringList() + obj.SetCommandLineCommands(commands) + obj.GetCommandLineCommands(commands) + obj.SetScriptCallbackBody("Insert Python Code here") + obj.GetAllowList() + obj.SetAllowList(False) + obj.GetAllowDelete() + obj.SetAllowDelete(False) + obj.GetAllowDisable() + obj.SetAllowDisable(False) + stream = lldb.SBStream() + obj.GetDescription(stream) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py index 77e45c861e8d..ac0f9a8aeb94 100644 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py +++ b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py @@ -30,6 +30,10 @@ def fuzz_obj(obj): obj.FindTargetWithFileAndArch("a.out", "arm") obj.GetNumTargets() obj.GetSelectedTarget() + obj.GetNumPlatforms() + obj.GetPlatformAtIndex(0xffffffff) + obj.GetNumAvailablePlatforms() + obj.GetAvailablePlatformInfoAtIndex(0xffffffff) obj.GetSourceManager() obj.SetSelectedTarget(lldb.SBTarget()) obj.SetCurrentPlatformSDKRoot("tmp/sdk-root") diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py new file mode 100644 index 000000000000..020ad4e10664 --- /dev/null +++ b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py @@ -0,0 +1,22 @@ +""" +Fuzz tests an object after the default construction to make sure it does not crash lldb. +""" + +import sys +import lldb + + +def fuzz_obj(obj): + obj.IsValid() + obj.GetName() + obj.GetExecutableFile() + obj.GetProcessID() + obj.GetUserID() + obj.GetGroupID() + obj.UserIDIsValid() + obj.GroupIDIsValid() + obj.GetEffectiveUserID() + obj.GetEffectiveGroupID() + obj.EffectiveUserIDIsValid() + obj.EffectiveGroupIDIsValid() + obj.GetParentProcessID() diff --git a/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm b/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm index f7383a5a14de..9d4630dc7c4c 100644 --- a/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm +++ b/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm @@ -6,7 +6,7 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#import <Cocoa/Cocoa.h> +#import <Foundation/Foundation.h> #include <vector> int main (int argc, char const *argv[]) diff --git a/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py b/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py diff --git a/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py b/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py index 06ca772073ac..a2d2cf12cdca 100644 --- a/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py +++ b/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py @@ -90,7 +90,7 @@ class FrameAPITestCase(TestBase): # Make sure on arm targets we dont mismatch PC value on the basis of thumb bit. # Frame PC will not have thumb bit set in case of a thumb # instruction as PC. - if self.getArchitecture() in ['arm']: + if self.getArchitecture() in ['arm', 'armv7', 'armv7k']: pc_value_int &= ~1 self.assertTrue( pc_value_int == frame.GetPC(), diff --git a/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py b/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py index 44dd4a618507..fb4e54aa0bc5 100644 --- a/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py +++ b/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py @@ -79,6 +79,7 @@ class HelloWorldTestCase(TestBase): @add_test_categories(['pyapi']) @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24600") @skipIfiOSSimulator + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_with_attach_to_process_with_id_api(self): """Create target, spawn a process, and attach to it with process id.""" self.build(dictionary=self.d) @@ -108,6 +109,7 @@ class HelloWorldTestCase(TestBase): @add_test_categories(['pyapi']) @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24600") @skipIfiOSSimulator + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_with_attach_to_process_with_name_api(self): """Create target, spawn a process, and attach to it with process name.""" self.build(dictionary=self.d) diff --git a/packages/Python/lldbsuite/test/python_api/hello_world/main.c b/packages/Python/lldbsuite/test/python_api/hello_world/main.c index 1b942d0db159..001e9c01e6e5 100644 --- a/packages/Python/lldbsuite/test/python_api/hello_world/main.c +++ b/packages/Python/lldbsuite/test/python_api/hello_world/main.c @@ -1,5 +1,5 @@ #include <stdio.h> - +#include <unistd.h> int main(int argc, char const *argv[]) { lldb_enable_attach(); @@ -10,9 +10,8 @@ int main(int argc, char const *argv[]) // Waiting to be attached by the debugger, otherwise. char line[100]; - while (fgets(line, sizeof(line), stdin)) { // Waiting to be attached... - printf("input line=>%s\n", line); - } + while (1) + sleep (1); // Waiting to be attached... printf("Exiting now\n"); } diff --git a/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py b/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py index 49a78888ad89..a19cc5c375f5 100644 --- a/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py +++ b/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py @@ -76,17 +76,18 @@ class RegistersIteratorTestCase(TestBase): REGs = lldbutil.get_ESRs(frame) if self.platformIsDarwin(): - num = len(REGs) - if self.TraceOn(): - print( - "\nNumber of exception state registers: %d" % - num) - for reg in REGs: - self.assertTrue(reg) + if self.getArchitecture() != 'armv7' and self.getArchitecture() != 'armv7k': + num = len(REGs) if self.TraceOn(): print( - "%s => %s" % - (reg.GetName(), reg.GetValue())) + "\nNumber of exception state registers: %d" % + num) + for reg in REGs: + self.assertTrue(reg) + if self.TraceOn(): + print( + "%s => %s" % + (reg.GetName(), reg.GetValue())) else: self.assertIsNone(REGs) @@ -99,7 +100,8 @@ class RegistersIteratorTestCase(TestBase): REGs = lldbutil.get_registers( frame, "Exception State Registers") if self.platformIsDarwin(): - self.assertIsNotNone(REGs) + if self.getArchitecture() != 'armv7' and self.getArchitecture() != 'armv7k': + self.assertIsNotNone(REGs) else: self.assertIsNone(REGs) diff --git a/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py b/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py index 1009536b3709..065c70744890 100644 --- a/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py +++ b/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py @@ -325,3 +325,79 @@ class ProcessAPITestCase(TestBase): num = process.GetNumSupportedHardwareWatchpoints(error) if self.TraceOn() and error.Success(): print("Number of supported hardware watchpoints: %d" % num) + + @add_test_categories(['pyapi']) + @no_debug_info_test + def test_get_process_info(self): + """Test SBProcess::GetProcessInfo() API with a locally launched process.""" + self.build() + exe = os.path.join(os.getcwd(), "a.out") + self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) + + target = self.dbg.CreateTarget(exe) + self.assertTrue(target, VALID_TARGET) + + # Launch the process and stop at the entry point. + launch_info = lldb.SBLaunchInfo(None) + launch_info.SetWorkingDirectory(self.get_process_working_directory()) + launch_flags = launch_info.GetLaunchFlags() + launch_flags |= lldb.eLaunchFlagStopAtEntry + launch_info.SetLaunchFlags(launch_flags) + error = lldb.SBError() + process = target.Launch(launch_info, error) + + if not error.Success(): + self.fail("Failed to launch process") + + # Verify basic process info can be retrieved successfully + process_info = process.GetProcessInfo() + self.assertTrue(process_info.IsValid()) + file_spec = process_info.GetExecutableFile() + self.assertTrue(file_spec.IsValid()) + process_name = process_info.GetName() + self.assertIsNotNone(process_name, "Process has a name") + self.assertGreater(len(process_name), 0, "Process name isn't blank") + self.assertEqual(file_spec.GetFilename(), "a.out") + self.assertNotEqual( + process_info.GetProcessID(), lldb.LLDB_INVALID_PROCESS_ID, + "Process ID is valid") + + # Additional process info varies by platform, so just check that + # whatever info was retrieved is consistent and nothing blows up. + if process_info.UserIDIsValid(): + self.assertNotEqual( + process_info.GetUserID(), lldb.UINT32_MAX, + "Process user ID is valid") + else: + self.assertEqual( + process_info.GetUserID(), lldb.UINT32_MAX, + "Process user ID is invalid") + + if process_info.GroupIDIsValid(): + self.assertNotEqual( + process_info.GetGroupID(), lldb.UINT32_MAX, + "Process group ID is valid") + else: + self.assertEqual( + process_info.GetGroupID(), lldb.UINT32_MAX, + "Process group ID is invalid") + + if process_info.EffectiveUserIDIsValid(): + self.assertNotEqual( + process_info.GetEffectiveUserID(), lldb.UINT32_MAX, + "Process effective user ID is valid") + else: + self.assertEqual( + process_info.GetEffectiveUserID(), lldb.UINT32_MAX, + "Process effective user ID is invalid") + + if process_info.EffectiveGroupIDIsValid(): + self.assertNotEqual( + process_info.GetEffectiveGroupID(), lldb.UINT32_MAX, + "Process effective group ID is valid") + else: + self.assertEqual( + process_info.GetEffectiveGroupID(), lldb.UINT32_MAX, + "Process effective group ID is invalid") + + process_info.GetParentProcessID() diff --git a/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py b/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py index 5314930ff99e..71f77b368809 100644 --- a/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py +++ b/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py @@ -59,6 +59,7 @@ class ProcessIOTestCase(TestBase): @skipIfWindows # stdio manipulation unsupported on Windows @add_test_categories(['pyapi']) @expectedFlakeyLinux(bugnumber="llvm.org/pr26437") + @skipIfDarwinEmbedded # debugserver can't create/write files on the device def test_stdout_redirection(self): """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR.""" self.build() @@ -72,6 +73,7 @@ class ProcessIOTestCase(TestBase): @skipIfWindows # stdio manipulation unsupported on Windows @add_test_categories(['pyapi']) @expectedFlakeyLinux(bugnumber="llvm.org/pr26437") + @skipIfDarwinEmbedded # debugserver can't create/write files on the device def test_stderr_redirection(self): """Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT.""" self.build() @@ -85,6 +87,7 @@ class ProcessIOTestCase(TestBase): @skipIfWindows # stdio manipulation unsupported on Windows @add_test_categories(['pyapi']) @expectedFlakeyLinux(bugnumber="llvm.org/pr26437") + @skipIfDarwinEmbedded # debugserver can't create/write files on the device def test_stdout_stderr_redirection(self): """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR without redirecting STDIN.""" self.build() diff --git a/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m b/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m index 599d36107f41..6ac70d1d06b7 100644 --- a/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m +++ b/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m @@ -6,7 +6,7 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#import <Cocoa/Cocoa.h> +#import <Foundation/Foundation.h> @interface ThisClassTestsThings : NSObject @end diff --git a/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile b/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile index e5c7b9150738..ddffdcfb62d6 100644 --- a/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile +++ b/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile @@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp # Clean renamed executable on 'make clean' clean: OBJECTS+=no_synth -# 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/python_api/watchpoint/.categories b/packages/Python/lldbsuite/test/python_api/watchpoint/.categories new file mode 100644 index 000000000000..50c1613cda72 --- /dev/null +++ b/packages/Python/lldbsuite/test/python_api/watchpoint/.categories @@ -0,0 +1 @@ +watchpoint diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py b/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py index bc925ee693d4..cef8a0c4e81f 100644 --- a/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py +++ b/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py @@ -28,8 +28,6 @@ class SetWatchpointAPITestCase(TestBase): self.source, '// Set break point at this line.') @add_test_categories(['pyapi']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py index 2685ef819cad..0d1ef809d291 100644 --- a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ b/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py @@ -28,8 +28,6 @@ class WatchpointIgnoreCountTestCase(TestBase): self.source, '// Set break point at this line.') @add_test_categories(['pyapi']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py b/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py index 33f1be77ad57..ca5fca3acf9a 100644 --- a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py +++ b/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py @@ -19,6 +19,10 @@ class WatchpointIteratorTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + # hardware watchpoints are not reported with a hardware index # on armv7 on ios devices + def affected_by_radar_34564183(self): + return (self.getArchitecture() == 'armv7' or self.getArchitecture() == 'armv7k') and self.platformIsDarwin() + def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -29,8 +33,6 @@ class WatchpointIteratorTestCase(TestBase): self.source, '// Set break point at this line.') @add_test_categories(['pyapi']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -99,7 +101,8 @@ class WatchpointIteratorTestCase(TestBase): # meaningful hardware index at this point. Exercise the printed repr of # SBWatchpointLocation. print(watchpoint) - self.assertTrue(watchpoint.GetHardwareIndex() != -1) + if not self.affected_by_radar_34564183(): + self.assertTrue(watchpoint.GetHardwareIndex() != -1) # SBWatchpoint.GetDescription() takes a description level arg. print(lldbutil.get_description(watchpoint, lldb.eDescriptionLevelFull)) diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py index 03c94b6d04fa..4b0216d7a602 100644 --- a/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py +++ b/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py @@ -33,8 +33,6 @@ class WatchpointConditionAPITestCase(TestBase): self.exe_name = self.testMethodName self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["linux"], archs=["aarch64"], diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py index 1cbaf5f46f61..e6bc9c0a7654 100644 --- a/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py +++ b/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py @@ -31,8 +31,6 @@ class SetWatchlocationAPITestCase(TestBase): self.violating_func = "do_bad_thing_with_location" @add_test_categories(['pyapi']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py index 6078901c6697..80595060b42d 100644 --- a/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ b/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py @@ -30,8 +30,6 @@ class TargetWatchAddressAPITestCase(TestBase): self.violating_func = "do_bad_thing_with_location" @add_test_categories(['pyapi']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") @@ -107,8 +105,6 @@ class TargetWatchAddressAPITestCase(TestBase): # This finishes our test. @add_test_categories(['pyapi']) - # Watchpoints not supported - @expectedFailureAndroid(archs=['arm', 'aarch64']) # No size constraint on MIPS for watches @skipIf(archs=['mips', 'mipsel', 'mips64', 'mips64el']) @skipIf(archs=['s390x']) # Likewise on SystemZ diff --git a/packages/Python/lldbsuite/test/settings/TestSettings.py b/packages/Python/lldbsuite/test/settings/TestSettings.py index a8bd57341edf..5e1cd44c01b9 100644 --- a/packages/Python/lldbsuite/test/settings/TestSettings.py +++ b/packages/Python/lldbsuite/test/settings/TestSettings.py @@ -215,6 +215,7 @@ class SettingsCommandTestCase(TestBase): self.expect("disassemble -n numberfn", substrs=["5ah"]) + @skipIfDarwinEmbedded # <rdar://problem/34446098> debugserver on ios etc can't write files def test_run_args_and_env_vars(self): """Test that run-args and env-vars are passed to the launched process.""" self.build() @@ -286,6 +287,7 @@ class SettingsCommandTestCase(TestBase): "The host environment variable 'MY_HOST_ENV_VAR1' successfully passed.", "The host environment variable 'MY_HOST_ENV_VAR2' successfully passed."]) + @skipIfDarwinEmbedded # <rdar://problem/34446098> debugserver on ios etc can't write files def test_set_error_output_path(self): """Test that setting target.error/output-path for the launched process works.""" self.build() diff --git a/packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py b/packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py index b193c81e6442..02110d1684f8 100644 --- a/packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py +++ b/packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py @@ -82,16 +82,16 @@ class SettingsCommandTestCase(TestBase): exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - self.runCmd("process launch -o stdout.txt -- " + args_in) + self.runCmd("process launch -- " + args_in) if lldb.remote_platform: - src_file_spec = lldb.SBFileSpec('stdout.txt', False) - dst_file_spec = lldb.SBFileSpec('stdout.txt', True) + src_file_spec = lldb.SBFileSpec('output.txt', False) + dst_file_spec = lldb.SBFileSpec('output.txt', True) lldb.remote_platform.Get(src_file_spec, dst_file_spec) - with open('stdout.txt', 'r') as f: + with open('output.txt', 'r') as f: output = f.read() - self.RemoveTempFile("stdout.txt") + self.RemoveTempFile("output.txt") self.assertEqual(output, args_out) diff --git a/packages/Python/lldbsuite/test/settings/quoting/main.c b/packages/Python/lldbsuite/test/settings/quoting/main.c index 6e01c2d1cd87..5e3e34f84a67 100644 --- a/packages/Python/lldbsuite/test/settings/quoting/main.c +++ b/packages/Python/lldbsuite/test/settings/quoting/main.c @@ -1,13 +1,21 @@ #include <stdio.h> #include <string.h> +#include <stdlib.h> /* This program writes its arguments (separated by '\0') to stdout. */ int main(int argc, char const *argv[]) { int i; + + FILE *output = fopen ("output.txt", "w"); + if (output == NULL) + exit (1); + for (i = 1; i < argc; ++i) - fwrite(argv[i], strlen(argv[i])+1, 1, stdout); + fwrite(argv[i], strlen(argv[i])+1, 1, output); + + fclose (output); return 0; } diff --git a/packages/Python/lldbsuite/test/test_categories.py b/packages/Python/lldbsuite/test/test_categories.py index a1c2859536d1..46e3f3409dfc 100644 --- a/packages/Python/lldbsuite/test/test_categories.py +++ b/packages/Python/lldbsuite/test/test_categories.py @@ -34,7 +34,9 @@ all_categories = { 'stresstest': 'Tests related to stressing lldb limits', 'flakey': 'Flakey test cases, i.e. tests that do not reliably pass at each execution', 'lldb-mi': 'lldb-mi tests', - 'darwin-log': 'Darwin log tests'} + 'darwin-log': 'Darwin log tests', + 'watchpoint': 'Watchpoint-related tests', +} def unique_string_match(yourentry, list): @@ -53,10 +55,10 @@ def is_supported_on_platform(category, platform, compiler_path): # -gsplit-dwarf is not implemented by clang on Windows. return platform in ["linux", "freebsd"] elif category == "dsym": - return platform in ["darwin", "macosx", "ios"] + return platform in ["darwin", "macosx", "ios", "watchos", "tvos", "bridgeos"] elif category == "gmodules": # First, check to see if the platform can even support gmodules. - if platform not in ["linux", "freebsd", "darwin", "macosx", "ios"]: + if platform not in ["linux", "freebsd", "darwin", "macosx", "ios", "watchos", "tvos", "bridgeos"]: return False return gmodules.is_compiler_clang_with_gmodules(compiler_path) return True diff --git a/packages/Python/lldbsuite/test/test_result.py b/packages/Python/lldbsuite/test/test_result.py index 7bfe9708386c..3f5e556040b2 100644 --- a/packages/Python/lldbsuite/test/test_result.py +++ b/packages/Python/lldbsuite/test/test_result.py @@ -105,6 +105,32 @@ class LLDBTestResult(unittest2.TextTestResult): else: return str(test) + @staticmethod + def _getFileBasedCategories(test): + """ + Returns the list of categories to which this test case belongs by + looking for a ".categories" file. We start at the folder the test is in + an traverse the hierarchy upwards - we guarantee a .categories to exist + at the top level directory so we do not end up looping endlessly. + """ + import inspect + import os.path + folder = inspect.getfile(test.__class__) + folder = os.path.dirname(folder) + while folder != '/': + categories_file_name = os.path.join(folder, ".categories") + if os.path.exists(categories_file_name): + categories_file = open(categories_file_name, 'r') + categories = categories_file.readline() + categories_file.close() + categories = str.replace(categories, '\n', '') + categories = str.replace(categories, '\r', '') + return categories.split(',') + else: + folder = os.path.dirname(folder) + continue + + def getCategoriesForTest(self, test): """ Gets all the categories for the currently running test method in test case @@ -114,7 +140,7 @@ class LLDBTestResult(unittest2.TextTestResult): if test_method is not None and hasattr(test_method, "categories"): test_categories.extend(test_method.categories) - test_categories.extend(test.getCategories()) + test_categories.extend(self._getFileBasedCategories(test)) return test_categories diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/.categories b/packages/Python/lldbsuite/test/tools/lldb-mi/.categories new file mode 100644 index 000000000000..8b5f00ce15ae --- /dev/null +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/.categories @@ -0,0 +1 @@ +lldb-mi diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py b/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py index 4e03d557b7a9..80ceadb6f268 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py @@ -15,6 +15,7 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): mydir = TestBase.compute_mydir(__file__) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races @expectedFailureAll( @@ -37,6 +38,7 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): # Test that lldb-mi is ready to execute next commands self.expect(self.child_prompt, exactly=True) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_exec_abort(self): @@ -87,6 +89,7 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): self.expect("\^done") self.expect("\*stopped,reason=\"exited-normally\"") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_exec_arguments_set(self): @@ -131,6 +134,7 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-interpreter-exec command \"print argv[4]\"") self.expect("\\\"fourth=\\\\\\\"4th arg\\\\\\\"\\\"", exactly=True) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_exec_arguments_reset(self): @@ -159,6 +163,7 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-data-evaluate-expression argc") self.expect("\^done,value=\"1\"") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_exec_next(self): @@ -214,6 +219,7 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-exec-next --frame 10") #self.expect("\^error: Frame index 10 is out of range") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_exec_next_instruction(self): @@ -273,6 +279,7 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-exec-next-instruction --frame 10") #self.expect("\^error: Frame index 10 is out of range") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_exec_step(self): @@ -355,6 +362,7 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-exec-step --frame 10") #self.expect("\^error: Frame index 10 is out of range") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_exec_step_instruction(self): @@ -430,6 +438,7 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-exec-step-instruction --frame 10") #self.expect("\^error: Frame index 10 is out of range") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_exec_finish(self): diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py b/packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py index 0b521812384e..f3a277246862 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py @@ -16,6 +16,7 @@ class MiDataTestCase(lldbmi_testcase.MiTestCaseBase): mydir = TestBase.compute_mydir(__file__) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_data_disassemble(self): @@ -86,10 +87,9 @@ class MiDataTestCase(lldbmi_testcase.MiTestCaseBase): self.expect(["{address=\"0x[0-9a-f]+\",func-name=\"hello_world\(\)\",offset=\"[0-9]+\",size=\"[0-9]+\",inst=\".+?; \\\\\"Hello, World!\\\\\\\\n\\\\\"\"}", "{address=\"0x[0-9a-f]+\",func-name=\"hello_world\(\)\",offset=\"[0-9]+\",size=\"[0-9]+\",inst=\".+?; symbol stub for: printf\"}"]) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races - # FIXME: the global case worked before refactoring - @unittest2.skip("-data-evaluate-expression doesn't work on globals") def test_lldbmi_data_read_memory_bytes_global(self): """Test that -data-read-memory-bytes can access global buffers.""" @@ -115,7 +115,7 @@ class MiDataTestCase(lldbmi_testcase.MiTestCaseBase): # Test that -data-read-memory-bytes works for char[] type (global) self.runCmd("-data-read-memory-bytes %#x %d" % (addr, size)) self.expect( - "\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1112131400\"}\]" % + "\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1011121300\"}\]" % (addr, addr + size)) # Get address of static char[] @@ -127,9 +127,10 @@ class MiDataTestCase(lldbmi_testcase.MiTestCaseBase): # Test that -data-read-memory-bytes works for static char[] type self.runCmd("-data-read-memory-bytes %#x %d" % (addr, size)) self.expect( - "\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1112131400\"}\]" % + "\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"2021222300\"}\]" % (addr, addr + size)) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_data_read_memory_bytes_local(self): @@ -269,6 +270,7 @@ class MiDataTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd('-data-read-memory-bytes --thread 1 &array') self.expect(r'\^error') + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_data_list_register_names(self): @@ -295,6 +297,7 @@ class MiDataTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-data-list-register-names 0") self.expect("\^done,register-names=\[\".+?\"\]") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_data_list_register_values(self): @@ -323,6 +326,7 @@ class MiDataTestCase(lldbmi_testcase.MiTestCaseBase): self.expect( "\^done,register-values=\[{number=\"0\",value=\"0x[0-9a-f]+\"}\]") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_data_info_line(self): @@ -377,6 +381,7 @@ class MiDataTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-data-info-line main.cpp:0") self.expect("\^error,msg=\"error: zero is an invalid line number") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_data_evaluate_expression(self): diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp b/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp index 8030fe891de2..85c38634f84b 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp @@ -17,6 +17,8 @@ local_array_test_inner() { char array[] = { 0x01, 0x02, 0x03, 0x04 }; char *first_element_ptr = &array[0]; + char g = g_CharArray[0]; + char s = s_CharArray[0]; // BP_local_array_test_inner return; } diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py b/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py index a862609d6978..2226395dcf2e 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py @@ -14,9 +14,6 @@ class MiTestCaseBase(Base): myexe = "a.out" mylog = "child.log" - def getCategories(self): - return ['lldb-mi'] - @classmethod def classCleanup(cls): TestBase.RemoveTempFile(cls.myexe) diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py b/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py index 597969dd6c53..cea5e6f96e9c 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py @@ -170,6 +170,7 @@ class MiSignalTestCase(lldbmi_testcase.MiTestCaseBase): "\*stopped,reason=\"exception-received\",exception=\"invalid address \(fault address: 0x0\)\",thread-id=\"1\",stopped-threads=\"all\""]) @skipUnlessDarwin + @skipIfRemote # We do not currently support remote debugging via the MI. def test_lldbmi_stopped_when_segfault_remote(self): """Test that 'lldb-mi --interpreter' notifies after it was stopped when segfault occurred (remote).""" diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py b/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py index 454597c1c5dd..c5c10bc139f5 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py @@ -17,6 +17,7 @@ class MiStackTestCase(lldbmi_testcase.MiTestCaseBase): @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + @skipIfRemote # We do not currently support remote debugging via the MI. def test_lldbmi_stack_list_arguments(self): """Test that 'lldb-mi --interpreter' can shows arguments.""" @@ -89,6 +90,7 @@ class MiStackTestCase(lldbmi_testcase.MiTestCaseBase): @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + @skipIfRemote # We do not currently support remote debugging via the MI. def test_lldbmi_stack_list_locals(self): """Test that 'lldb-mi --interpreter' can shows local variables.""" @@ -243,6 +245,7 @@ class MiStackTestCase(lldbmi_testcase.MiTestCaseBase): @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + @skipIfRemote # We do not currently support remote debugging via the MI. def test_lldbmi_stack_list_variables(self): """Test that 'lldb-mi --interpreter' can shows local variables and arguments.""" @@ -389,6 +392,7 @@ class MiStackTestCase(lldbmi_testcase.MiTestCaseBase): @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + @skipIfRemote # We do not currently support remote debugging via the MI. def test_lldbmi_stack_info_depth(self): """Test that 'lldb-mi --interpreter' can shows depth of the stack.""" @@ -423,6 +427,7 @@ class MiStackTestCase(lldbmi_testcase.MiTestCaseBase): @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races @skipUnlessDarwin + @skipIfRemote # We do not currently support remote debugging via the MI. def test_lldbmi_stack_info_frame(self): """Test that 'lldb-mi --interpreter' can show information about current frame.""" @@ -465,6 +470,7 @@ class MiStackTestCase(lldbmi_testcase.MiTestCaseBase): @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + @skipIfRemote # We do not currently support remote debugging via the MI. def test_lldbmi_stack_list_frames(self): """Test that 'lldb-mi --interpreter' can lists the frames on the stack.""" @@ -488,6 +494,7 @@ class MiStackTestCase(lldbmi_testcase.MiTestCaseBase): @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races + @skipIfRemote # We do not currently support remote debugging via the MI. def test_lldbmi_stack_select_frame(self): """Test that 'lldb-mi --interpreter' can choose current frame.""" diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py b/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py index 7673846d6df5..80b925993d31 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py @@ -14,6 +14,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase): mydir = TestBase.compute_mydir(__file__) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_executable_option_file(self): @@ -59,6 +60,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase): # Test that lldb-mi is ready when executable was loaded self.expect(self.child_prompt, exactly=True) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_executable_option_absolute_path(self): @@ -83,6 +85,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase): self.expect("\^running") self.expect("\*stopped,reason=\"exited-normally\"") + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_executable_option_relative_path(self): @@ -126,6 +129,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase): # Test that lldb-mi is ready when executable was loaded self.expect(self.child_prompt, exactly=True) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races @skipIfLinux # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots @@ -168,6 +172,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase): self.expect("\^done,value=\"10\"") self.expect(self.child_prompt, exactly=True) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races @skipIfLinux # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots @@ -232,6 +237,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase): # Test that lldb-mi is ready after execution of --source start_script self.expect(self.child_prompt, exactly=True) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_log_option(self): @@ -264,6 +270,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase): for f in logFile: os.remove(f) + @skipIfRemote # We do not currently support remote debugging via the MI. @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races def test_lldbmi_log_directory_option(self): diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py b/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py index d4685d39791a..6155858cf112 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py +++ b/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py @@ -159,6 +159,7 @@ class MiVarTestCase(lldbmi_testcase.MiTestCaseBase): @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races @skipIfLinux # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots + @skipIfDarwin # rdar://33462982 @skipIfRemote # We do not currently support remote debugging via the MI. def test_lldbmi_var_update(self): """Test that 'lldb-mi --interpreter' works for -var-update.""" diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py index e53d80b48f9d..1696b599de65 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py @@ -12,6 +12,7 @@ class TestGdbRemoteAttach(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def attach_with_vAttach(self): # Start the inferior, start the debug monitor, nothing is attached yet. procs = self.prep_debug_monitor_and_inferior( diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py index ffabefc70f8d..3c87ee61ab6f 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py @@ -13,6 +13,7 @@ class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase): AUXV_SUPPORT_FEATURE_NAME = "qXfer:auxv:read" + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def has_auxv_support(self): inferior_args = ["message:main entered", "sleep:5"] procs = self.prep_debug_monitor_and_inferior( diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py index dc2b99f54bd6..94e81963483a 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py @@ -11,6 +11,7 @@ class TestGdbRemoteExpeditedRegisters( gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def gather_expedited_registers(self): # Setup the stub and set the gdb remote command stream. diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py index d84511d54273..464cdce5e9e0 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py @@ -98,12 +98,14 @@ class TestGdbRemoteHostInfo(GdbRemoteTestCaseBase): "qHostInfo is missing the following required " "keys: " + str(missing_keys)) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @debugserver_test def test_qHostInfo_returns_at_least_one_key_val_pair_debugserver(self): self.init_debugserver_test() self.build() self.get_qHostInfo_response() + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @llgs_test def test_qHostInfo_returns_at_least_one_key_val_pair_llgs(self): self.init_llgs_test() @@ -111,6 +113,7 @@ class TestGdbRemoteHostInfo(GdbRemoteTestCaseBase): self.get_qHostInfo_response() @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @debugserver_test def test_qHostInfo_contains_darwin_required_keys_debugserver(self): self.init_debugserver_test() @@ -119,6 +122,7 @@ class TestGdbRemoteHostInfo(GdbRemoteTestCaseBase): self.validate_darwin_minimum_host_info_keys(host_info_dict) @skipUnlessDarwin + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @llgs_test def test_qHostInfo_contains_darwin_required_keys_llgs(self): self.init_llgs_test() diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py index c3ecf5bc24df..6b8ed3b4c502 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py @@ -11,6 +11,7 @@ from lldbsuite.test import lldbutil class TestGdbRemoteKill(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def attach_commandline_kill_after_initial_stop(self): procs = self.prep_debug_monitor_and_inferior() diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py index 21af255cfd94..4f7123d789a4 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py @@ -36,6 +36,7 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase): self.assertTrue(lldbgdbserverutils.process_is_running(pid, True)) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qProcessInfo_returns_running_process_debugserver(self): self.init_debugserver_test() self.build() @@ -67,6 +68,7 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase): self.assertEqual(reported_pid, procs["inferior"].pid) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_attach_commandline_qProcessInfo_reports_correct_pid_debugserver( self): self.init_debugserver_test() @@ -99,6 +101,7 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase): self.assertTrue(endian in ["little", "big", "pdp"]) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qProcessInfo_reports_valid_endian_debugserver(self): self.init_debugserver_test() self.build() @@ -159,6 +162,7 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase): @skipUnlessDarwin @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qProcessInfo_contains_cputype_cpusubtype_debugserver_darwin(self): self.init_debugserver_test() self.build() @@ -180,6 +184,7 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase): @skipUnlessDarwin @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qProcessInfo_does_not_contain_triple_debugserver_darwin(self): self.init_debugserver_test() self.build() diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py index b484bdcc4d57..3d9bb1d21bfe 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py @@ -12,6 +12,7 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def grp_register_save_restore_works(self, with_suffix): # Start up the process, use thread suffix, grab main thread id. inferior_args = ["message:main entered", "sleep:5"] diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py index bcb632dd4ef8..f4e1851ff98f 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py @@ -11,6 +11,7 @@ class TestGdbRemoteSingleStep(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @debugserver_test def test_single_step_only_steps_one_instruction_with_s_debugserver(self): self.init_debugserver_test() diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py index b361b9e6d915..2bf0952e902e 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py @@ -175,6 +175,7 @@ class TestGdbRemoteThreadsInStopReply( context = self.expect_gdbremote_sequence() self.assertIsNotNone(context) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @debugserver_test def test_QListThreadsInStopReply_supported_debugserver(self): self.init_debugserver_test() @@ -196,6 +197,7 @@ class TestGdbRemoteThreadsInStopReply( self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, thread_count) self.assertEqual(len(stop_reply_threads), thread_count) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @debugserver_test def test_stop_reply_reports_multiple_threads_debugserver(self): self.init_debugserver_test() @@ -216,6 +218,7 @@ class TestGdbRemoteThreadsInStopReply( stop_reply_threads = self.gather_stop_reply_threads(None, thread_count) self.assertEqual(len(stop_reply_threads), 0) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @debugserver_test def test_no_QListThreadsInStopReply_supplies_no_threads_debugserver(self): self.init_debugserver_test() @@ -252,6 +255,7 @@ class TestGdbRemoteThreadsInStopReply( for tid in threads: self.assertTrue(tid in stop_reply_threads) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @debugserver_test def test_stop_reply_reports_correct_threads_debugserver(self): self.init_debugserver_test() @@ -290,6 +294,7 @@ class TestGdbRemoteThreadsInStopReply( self.set_inferior_startup_launch() self.stop_reply_contains_thread_pcs(5) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet @debugserver_test def test_stop_reply_contains_thread_pcs_debugserver(self): self.init_debugserver_test() diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py index 74e4849b0cb6..647e57832b05 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py @@ -15,6 +15,8 @@ class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) THREAD_COUNT = 5 + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet + @skipIfDarwinEmbedded # <rdar://problem/27005337> def gather_stop_replies_via_qThreadStopInfo(self, thread_count): # Set up the inferior args. inferior_args = [] diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py index 9d0645c5b99d..f0380c7167e1 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py @@ -39,54 +39,63 @@ class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase): def vCont_supports_S(self): self.vCont_supports_mode("S") + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @debugserver_test def test_vCont_supports_c_debugserver(self): self.init_debugserver_test() self.build() self.vCont_supports_c() + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @llgs_test def test_vCont_supports_c_llgs(self): self.init_llgs_test() self.build() self.vCont_supports_c() + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @debugserver_test def test_vCont_supports_C_debugserver(self): self.init_debugserver_test() self.build() self.vCont_supports_C() + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @llgs_test def test_vCont_supports_C_llgs(self): self.init_llgs_test() self.build() self.vCont_supports_C() + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @debugserver_test def test_vCont_supports_s_debugserver(self): self.init_debugserver_test() self.build() self.vCont_supports_s() + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @llgs_test def test_vCont_supports_s_llgs(self): self.init_llgs_test() self.build() self.vCont_supports_s() + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @debugserver_test def test_vCont_supports_S_debugserver(self): self.init_debugserver_test() self.build() self.vCont_supports_S() + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @llgs_test def test_vCont_supports_S_llgs(self): self.init_llgs_test() self.build() self.vCont_supports_S() + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @debugserver_test def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_debugserver( self): @@ -109,6 +118,7 @@ class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase): "aarch64"], bugnumber="llvm.org/pr24739") @skipIf(triple='^mips') + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_llgs(self): self.init_llgs_test() self.build() @@ -116,6 +126,7 @@ class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase): self.single_step_only_steps_one_instruction( use_Hc_packet=True, step_instruction="vCont;s") + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") @debugserver_test def test_single_step_only_steps_one_instruction_with_vCont_s_thread_debugserver( self): @@ -138,6 +149,7 @@ class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase): "aarch64"], bugnumber="llvm.org/pr24739") @skipIf(triple='^mips') + @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337") def test_single_step_only_steps_one_instruction_with_vCont_s_thread_llgs( self): self.init_llgs_test() diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py index 6f36fbea470b..a4f306efdc98 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py @@ -29,6 +29,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod mydir = TestBase.compute_mydir(__file__) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_exe_starts_debugserver(self): self.init_debugserver_test() server = self.connect_to_debug_monitor() @@ -46,6 +47,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_start_no_ack_mode_debugserver(self): self.init_debugserver_test() self.start_no_ack_mode() @@ -68,6 +70,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_thread_suffix_supported_debugserver(self): self.init_debugserver_test() self.thread_suffix_supported() @@ -89,6 +92,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_list_threads_in_stop_reply_supported_debugserver(self): self.init_debugserver_test() self.list_threads_in_stop_reply_supported() @@ -114,6 +118,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_c_packet_works_debugserver(self): self.init_debugserver_test() self.build() @@ -146,6 +151,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertIsNotNone(context) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_inferior_print_exit_debugserver(self): self.init_debugserver_test() self.build() @@ -181,6 +187,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_first_launch_stop_reply_thread_matches_first_qC_debugserver(self): self.init_debugserver_test() self.build() @@ -216,6 +223,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod procs["inferior"].pid, False)) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_attach_commandline_continue_app_exits_debugserver(self): self.init_debugserver_test() self.build() @@ -254,6 +262,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod @debugserver_test @expectedFailureDarwin("llvm.org/pr25486") + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qRegisterInfo_returns_one_valid_result_debugserver(self): self.init_debugserver_test() self.build() @@ -286,6 +295,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod @debugserver_test @expectedFailureDarwin("llvm.org/pr25486") + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qRegisterInfo_returns_all_valid_results_debugserver(self): self.init_debugserver_test() self.build() @@ -332,6 +342,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertTrue('flags' in generic_regs) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qRegisterInfo_contains_required_generics_debugserver(self): self.init_debugserver_test() self.build() @@ -367,6 +378,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertTrue(len(register_sets) >= 1) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qRegisterInfo_contains_at_least_one_register_set_debugserver( self): self.init_debugserver_test() @@ -446,6 +458,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(len(threads), 1) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qThreadInfo_contains_thread_launch_debugserver(self): self.init_debugserver_test() self.build() @@ -460,6 +473,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.qThreadInfo_contains_thread() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qThreadInfo_contains_thread_attach_debugserver(self): self.init_debugserver_test() self.build() @@ -502,6 +516,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(threads[0], QC_thread_id) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qThreadInfo_matches_qC_launch_debugserver(self): self.init_debugserver_test() self.build() @@ -516,6 +531,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.qThreadInfo_matches_qC() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qThreadInfo_matches_qC_attach_debugserver(self): self.init_debugserver_test() self.build() @@ -579,6 +595,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod reg_index += 1 @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_debugserver( self): self.init_debugserver_test() @@ -595,6 +612,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.p_returns_correct_data_size_for_each_qRegisterInfo() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_debugserver( self): self.init_debugserver_test() @@ -643,6 +661,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(int(context.get("thread_id"), 16), thread) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_Hg_switches_to_3_threads_launch_debugserver(self): self.init_debugserver_test() self.build() @@ -657,6 +676,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.Hg_switches_to_3_threads() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_Hg_switches_to_3_threads_attach_debugserver(self): self.init_debugserver_test() self.build() @@ -783,6 +803,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod @unittest2.expectedFailure() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_Hc_then_Csignal_signals_correct_thread_launch_debugserver(self): self.init_debugserver_test() self.build() @@ -852,6 +873,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(read_contents, MEMORY_CONTENTS) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_m_packet_reads_memory_debugserver(self): self.init_debugserver_test() self.build() @@ -877,6 +899,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qMemoryRegionInfo_is_supported_debugserver(self): self.init_debugserver_test() self.build() @@ -939,6 +962,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assert_address_within_memory_region(code_address, mem_region_dict) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qMemoryRegionInfo_reports_code_address_as_executable_debugserver( self): self.init_debugserver_test() @@ -1003,6 +1027,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod stack_address, mem_region_dict) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_debugserver( self): self.init_debugserver_test() @@ -1067,6 +1092,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assert_address_within_memory_region(heap_address, mem_region_dict) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_debugserver( self): self.init_debugserver_test() @@ -1215,6 +1241,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertIsNotNone(context) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_software_breakpoint_set_and_remove_work_debugserver(self): self.init_debugserver_test() if self.getArchitecture() == "arm": @@ -1241,6 +1268,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod @skipUnlessPlatform(oslist=['linux']) @expectedFailureAndroid @skipIf(archs=no_match(['arm', 'aarch64'])) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_hardware_breakpoint_set_and_remove_work_debugserver(self): self.init_debugserver_test() if self.getArchitecture() == "arm": @@ -1280,6 +1308,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertTrue(len(supported_dict) > 0) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_qSupported_returns_known_stub_features_debugserver(self): self.init_debugserver_test() self.build() @@ -1353,6 +1382,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(printed_message, TEST_MESSAGE + "X") @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_written_M_content_reads_back_correctly_debugserver(self): self.init_debugserver_test() self.build() @@ -1402,6 +1432,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod # Come back to this. I have the test rigged to verify that at least some # of the bit-flip writes work. @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_P_writes_all_gpr_registers_debugserver(self): self.init_debugserver_test() self.build() @@ -1526,6 +1557,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod # Note: as of this moment, a hefty number of the GPR writes are failing # with E32 (everything except rax-rdx, rdi, rsi, rbp). @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_P_and_p_thread_suffix_work_debugserver(self): self.init_debugserver_test() self.build() diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py b/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py index c1a63af5424f..102f2e344af5 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py @@ -84,6 +84,7 @@ class TestStubReverseConnect(gdbremote_testcase.GdbRemoteTestCaseBase): stub_socket.shutdown(socket.SHUT_RDWR) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_reverse_connect_works_debugserver(self): self.init_debugserver_test(use_named_pipe=False) self.set_inferior_startup_launch() diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/exit-code/TestGdbRemoteExitCode.py b/packages/Python/lldbsuite/test/tools/lldb-server/exit-code/TestGdbRemoteExitCode.py index e77f2b7acec0..5ef4249bd241 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/exit-code/TestGdbRemoteExitCode.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/exit-code/TestGdbRemoteExitCode.py @@ -53,6 +53,7 @@ class TestGdbRemoteExitCode(GdbRemoteTestCaseBase): self.fail("failed to launch inferior: " + fail_reason) @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_start_inferior_debugserver(self): self.init_debugserver_test() self.build() @@ -80,6 +81,7 @@ class TestGdbRemoteExitCode(GdbRemoteTestCaseBase): self.expect_gdbremote_sequence() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_inferior_exit_0_debugserver(self): self.init_debugserver_test() self.build() @@ -112,6 +114,7 @@ class TestGdbRemoteExitCode(GdbRemoteTestCaseBase): self.expect_gdbremote_sequence() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_inferior_exit_42_debugserver(self): self.init_debugserver_test() self.build() diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py index 23cb86935857..67887256d97d 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py @@ -369,7 +369,7 @@ class GdbRemoteTestCaseBase(TestBase): ["*:{}".format(self.port)] else: commandline_args = self.debug_monitor_extra_args + \ - ["localhost:{}".format(self.port)] + ["127.0.0.1:{}".format(self.port)] if attach_pid: commandline_args += ["--attach=%d" % attach_pid] diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py b/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py index b417b3292e75..e905a85cc4d3 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py @@ -11,6 +11,7 @@ from lldbsuite.test import lldbutil class TestGdbRemoteAbort(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def inferior_abort_received(self): procs = self.prep_debug_monitor_and_inferior(inferior_args=["abort"]) self.assertIsNotNone(procs) diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py b/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py index 5bbca3c146d1..316d5d7b82bf 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py @@ -13,6 +13,7 @@ class TestGdbRemoteSegFault(gdbremote_testcase.GdbRemoteTestCaseBase): GDB_REMOTE_STOP_CODE_BAD_ACCESS = 0x91 + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def inferior_seg_fault_received(self, expected_signo): procs = self.prep_debug_monitor_and_inferior( inferior_args=["segfault"]) diff --git a/packages/Python/lldbsuite/test/types/AbstractBase.py b/packages/Python/lldbsuite/test/types/AbstractBase.py index 044a085e020e..ee548954a741 100644 --- a/packages/Python/lldbsuite/test/types/AbstractBase.py +++ b/packages/Python/lldbsuite/test/types/AbstractBase.py @@ -98,7 +98,7 @@ class GenericTester(TestBase): remote_path = lldbutil.append_to_process_working_directory( "lldb-stdout-redirect.txt") self.runCmd( - 'process launch -o {remote}'.format(remote=remote_path)) + 'process launch -- {remote}'.format(remote=remote_path)) # copy remote_path to local host self.runCmd('platform get-file {remote} "{local}"'.format( remote=remote_path, local=self.golden_filename)) diff --git a/packages/Python/lldbsuite/test/types/basic_type.cpp b/packages/Python/lldbsuite/test/types/basic_type.cpp index 1651815fa0ca..3102806ab5bc 100644 --- a/packages/Python/lldbsuite/test/types/basic_type.cpp +++ b/packages/Python/lldbsuite/test/types/basic_type.cpp @@ -89,6 +89,16 @@ typedef struct a_union_nonzero_tag { int main (int argc, char const *argv[]) { + FILE *out = stdout; + + // By default, output to stdout + // If a filename is provided as the command line argument, + // output to that file. + if (argc == 2 && argv[1] && argv[1][0] != '\0') + { + out = fopen (argv[1], "w"); + } + T a = T_VALUE_1; T* a_ptr = &a; T& a_ref = a; @@ -123,89 +133,93 @@ main (int argc, char const *argv[]) a_union_zero_t a_union_zero_array_unbounded[] = {{ T_VALUE_1 }, { T_VALUE_2 }}; #ifdef T_PRINTF_FORMAT - printf ("%s: a = '" T_PRINTF_FORMAT "'\n", T_CSTR, a); - printf ("%s*: %p => *a_ptr = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_ptr, *a_ptr); - printf ("%s&: @%p => a_ref = '" T_PRINTF_FORMAT "'\n", T_CSTR, &a_ref, a_ref); - - printf ("%s[2]: a_array_bounded[0] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_bounded[0]); - printf ("%s[2]: a_array_bounded[1] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_bounded[1]); - - printf ("%s[]: a_array_unbounded[0] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_unbounded[0]); - printf ("%s[]: a_array_unbounded[1] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_unbounded[1]); - - printf ("(a_class) a_class_instance.m_a = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_a()); - printf ("(a_class) a_class_instance.m_b = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_b()); - printf ("(a_class*) a_class_ptr = %p, a_class_ptr->m_a = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_a()); - printf ("(a_class*) a_class_ptr = %p, a_class_ptr->m_b = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_b()); - printf ("(a_class&) a_class_ref = %p, a_class_ref.m_a = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_a()); - printf ("(a_class&) a_class_ref = %p, a_class_ref.m_b = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_b()); - - printf ("(a_struct_t) a_struct.a = '" T_PRINTF_FORMAT "'\n", a_struct.a); - printf ("(a_struct_t) a_struct.b = '" T_PRINTF_FORMAT "'\n", a_struct.b); - printf ("(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->a = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->a); - printf ("(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->b = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->b); - printf ("(a_struct_t&) a_struct_ref = %p, a_struct_ref.a = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.a); - printf ("(a_struct_t&) a_struct_ref = %p, a_struct_ref.b = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.b); + fprintf (out, "%s: a = '" T_PRINTF_FORMAT "'\n", T_CSTR, a); + fprintf (out, "%s*: %p => *a_ptr = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_ptr, *a_ptr); + fprintf (out, "%s&: @%p => a_ref = '" T_PRINTF_FORMAT "'\n", T_CSTR, &a_ref, a_ref); + + fprintf (out, "%s[2]: a_array_bounded[0] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_bounded[0]); + fprintf (out, "%s[2]: a_array_bounded[1] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_bounded[1]); + + fprintf (out, "%s[]: a_array_unbounded[0] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_unbounded[0]); + fprintf (out, "%s[]: a_array_unbounded[1] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_unbounded[1]); + + fprintf (out, "(a_class) a_class_instance.m_a = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_a()); + fprintf (out, "(a_class) a_class_instance.m_b = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_b()); + fprintf (out, "(a_class*) a_class_ptr = %p, a_class_ptr->m_a = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_a()); + fprintf (out, "(a_class*) a_class_ptr = %p, a_class_ptr->m_b = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_b()); + fprintf (out, "(a_class&) a_class_ref = %p, a_class_ref.m_a = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_a()); + fprintf (out, "(a_class&) a_class_ref = %p, a_class_ref.m_b = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_b()); + + fprintf (out, "(a_struct_t) a_struct.a = '" T_PRINTF_FORMAT "'\n", a_struct.a); + fprintf (out, "(a_struct_t) a_struct.b = '" T_PRINTF_FORMAT "'\n", a_struct.b); + fprintf (out, "(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->a = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->a); + fprintf (out, "(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->b = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->b); + fprintf (out, "(a_struct_t&) a_struct_ref = %p, a_struct_ref.a = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.a); + fprintf (out, "(a_struct_t&) a_struct_ref = %p, a_struct_ref.b = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.b); - printf ("(a_union_zero_t) a_union_zero.a = '" T_PRINTF_FORMAT "'\n", a_union_zero.a); - printf ("(a_union_zero_t*) a_union_zero_ptr = %p, a_union_zero_ptr->a = '" T_PRINTF_FORMAT "'\n", a_union_zero_ptr, a_union_zero_ptr->a); - printf ("(a_union_zero_t&) a_union_zero_ref = %p, a_union_zero_ref.a = '" T_PRINTF_FORMAT "'\n", &a_union_zero_ref, a_union_zero_ref.a); + fprintf (out, "(a_union_zero_t) a_union_zero.a = '" T_PRINTF_FORMAT "'\n", a_union_zero.a); + fprintf (out, "(a_union_zero_t*) a_union_zero_ptr = %p, a_union_zero_ptr->a = '" T_PRINTF_FORMAT "'\n", a_union_zero_ptr, a_union_zero_ptr->a); + fprintf (out, "(a_union_zero_t&) a_union_zero_ref = %p, a_union_zero_ref.a = '" T_PRINTF_FORMAT "'\n", &a_union_zero_ref, a_union_zero_ref.a); - printf ("(a_union_nonzero_t) a_union_nonzero.u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero.u.a); - printf ("(a_union_nonzero_t*) a_union_nonzero_ptr = %p, a_union_nonzero_ptr->u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero_ptr, a_union_nonzero_ptr->u.a); - printf ("(a_union_nonzero_t&) a_union_nonzero_ref = %p, a_union_nonzero_ref.u.a = '" T_PRINTF_FORMAT "'\n", &a_union_nonzero_ref, a_union_nonzero_ref.u.a); + fprintf (out, "(a_union_nonzero_t) a_union_nonzero.u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero.u.a); + fprintf (out, "(a_union_nonzero_t*) a_union_nonzero_ptr = %p, a_union_nonzero_ptr->u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero_ptr, a_union_nonzero_ptr->u.a); + fprintf (out, "(a_union_nonzero_t&) a_union_nonzero_ref = %p, a_union_nonzero_ref.u.a = '" T_PRINTF_FORMAT "'\n", &a_union_nonzero_ref, a_union_nonzero_ref.u.a); - printf ("(a_struct_t[2]) a_struct_array_bounded[0].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[0].a); - printf ("(a_struct_t[2]) a_struct_array_bounded[0].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[0].b); - printf ("(a_struct_t[2]) a_struct_array_bounded[1].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[1].a); - printf ("(a_struct_t[2]) a_struct_array_bounded[1].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[1].b); + fprintf (out, "(a_struct_t[2]) a_struct_array_bounded[0].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[0].a); + fprintf (out, "(a_struct_t[2]) a_struct_array_bounded[0].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[0].b); + fprintf (out, "(a_struct_t[2]) a_struct_array_bounded[1].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[1].a); + fprintf (out, "(a_struct_t[2]) a_struct_array_bounded[1].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[1].b); - printf ("(a_struct_t[]) a_struct_array_unbounded[0].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[0].a); - printf ("(a_struct_t[]) a_struct_array_unbounded[0].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[0].b); - printf ("(a_struct_t[]) a_struct_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[1].a); - printf ("(a_struct_t[]) a_struct_array_unbounded[1].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[1].b); + fprintf (out, "(a_struct_t[]) a_struct_array_unbounded[0].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[0].a); + fprintf (out, "(a_struct_t[]) a_struct_array_unbounded[0].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[0].b); + fprintf (out, "(a_struct_t[]) a_struct_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[1].a); + fprintf (out, "(a_struct_t[]) a_struct_array_unbounded[1].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[1].b); - printf ("(a_union_zero_t[2]) a_union_zero_array_bounded[0].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_bounded[0].a); - printf ("(a_union_zero_t[2]) a_union_zero_array_bounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_bounded[1].a); + fprintf (out, "(a_union_zero_t[2]) a_union_zero_array_bounded[0].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_bounded[0].a); + fprintf (out, "(a_union_zero_t[2]) a_union_zero_array_bounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_bounded[1].a); - printf ("(a_union_zero_t[]) a_union_zero_array_unbounded[0].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[0].a); - printf ("(a_union_zero_t[]) a_union_zero_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[1].a); + fprintf (out, "(a_union_zero_t[]) a_union_zero_array_unbounded[0].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[0].a); + fprintf (out, "(a_union_zero_t[]) a_union_zero_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[1].a); #endif puts("About to exit, break here to check values..."); // Here is the line we will break on to check variables. #ifdef TEST_BLOCK_CAPTURED_VARS void (^myBlock)() = ^() { - printf ("%s: a = '" T_PRINTF_FORMAT "'\n", T_CSTR, a); - printf ("%s*: %p => *a_ptr = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_ptr, *a_ptr); - printf ("%s&: @%p => a_ref = '" T_PRINTF_FORMAT "'\n", T_CSTR, &a_ref, a_ref); - - printf ("(a_class) a_class_instance.m_a = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_a()); - printf ("(a_class) a_class_instance.m_b = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_b()); - printf ("(a_class*) a_class_ptr = %p, a_class_ptr->m_a = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_a()); - printf ("(a_class*) a_class_ptr = %p, a_class_ptr->m_b = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_b()); - printf ("(a_class&) a_class_ref = %p, a_class_ref.m_a = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_a()); - printf ("(a_class&) a_class_ref = %p, a_class_ref.m_b = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_b()); + fprintf (out, "%s: a = '" T_PRINTF_FORMAT "'\n", T_CSTR, a); + fprintf (out, "%s*: %p => *a_ptr = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_ptr, *a_ptr); + fprintf (out, "%s&: @%p => a_ref = '" T_PRINTF_FORMAT "'\n", T_CSTR, &a_ref, a_ref); + + fprintf (out, "(a_class) a_class_instance.m_a = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_a()); + fprintf (out, "(a_class) a_class_instance.m_b = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_b()); + fprintf (out, "(a_class*) a_class_ptr = %p, a_class_ptr->m_a = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_a()); + fprintf (out, "(a_class*) a_class_ptr = %p, a_class_ptr->m_b = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_b()); + fprintf (out, "(a_class&) a_class_ref = %p, a_class_ref.m_a = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_a()); + fprintf (out, "(a_class&) a_class_ref = %p, a_class_ref.m_b = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_b()); - printf ("(a_struct_t) a_struct.a = '" T_PRINTF_FORMAT "'\n", a_struct.a); - printf ("(a_struct_t) a_struct.b = '" T_PRINTF_FORMAT "'\n", a_struct.b); - printf ("(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->a = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->a); - printf ("(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->b = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->b); - printf ("(a_struct_t&) a_struct_ref = %p, a_struct_ref.a = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.a); - printf ("(a_struct_t&) a_struct_ref = %p, a_struct_ref.b = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.b); + fprintf (out, "(a_struct_t) a_struct.a = '" T_PRINTF_FORMAT "'\n", a_struct.a); + fprintf (out, "(a_struct_t) a_struct.b = '" T_PRINTF_FORMAT "'\n", a_struct.b); + fprintf (out, "(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->a = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->a); + fprintf (out, "(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->b = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->b); + fprintf (out, "(a_struct_t&) a_struct_ref = %p, a_struct_ref.a = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.a); + fprintf (out, "(a_struct_t&) a_struct_ref = %p, a_struct_ref.b = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.b); - printf ("(a_union_zero_t) a_union_zero.a = '" T_PRINTF_FORMAT "'\n", a_union_zero.a); - printf ("(a_union_zero_t*) a_union_zero_ptr = %p, a_union_zero_ptr->a = '" T_PRINTF_FORMAT "'\n", a_union_zero_ptr, a_union_zero_ptr->a); - printf ("(a_union_zero_t&) a_union_zero_ref = %p, a_union_zero_ref.a = '" T_PRINTF_FORMAT "'\n", &a_union_zero_ref, a_union_zero_ref.a); + fprintf (out, "(a_union_zero_t) a_union_zero.a = '" T_PRINTF_FORMAT "'\n", a_union_zero.a); + fprintf (out, "(a_union_zero_t*) a_union_zero_ptr = %p, a_union_zero_ptr->a = '" T_PRINTF_FORMAT "'\n", a_union_zero_ptr, a_union_zero_ptr->a); + fprintf (out, "(a_union_zero_t&) a_union_zero_ref = %p, a_union_zero_ref.a = '" T_PRINTF_FORMAT "'\n", &a_union_zero_ref, a_union_zero_ref.a); - printf ("(a_union_nonzero_t) a_union_nonzero.u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero.u.a); - printf ("(a_union_nonzero_t*) a_union_nonzero_ptr = %p, a_union_nonzero_ptr->u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero_ptr, a_union_nonzero_ptr->u.a); - printf ("(a_union_nonzero_t&) a_union_nonzero_ref = %p, a_union_nonzero_ref.u.a = '" T_PRINTF_FORMAT "'\n", &a_union_nonzero_ref, a_union_nonzero_ref.u.a); + fprintf (out, "(a_union_nonzero_t) a_union_nonzero.u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero.u.a); + fprintf (out, "(a_union_nonzero_t*) a_union_nonzero_ptr = %p, a_union_nonzero_ptr->u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero_ptr, a_union_nonzero_ptr->u.a); + fprintf (out, "(a_union_nonzero_t&) a_union_nonzero_ref = %p, a_union_nonzero_ref.u.a = '" T_PRINTF_FORMAT "'\n", &a_union_nonzero_ref, a_union_nonzero_ref.u.a); - printf ("That's All Folks!\n"); // Break here to test block captured variables. + fprintf (out, "That's All Folks!\n"); // Break here to test block captured variables. }; myBlock(); #endif + + if (out != stdout) + fclose (out); + return 0; } |