diff options
Diffstat (limited to 'lldb/test/API/functionalities/postmortem')
5 files changed, 63 insertions, 2 deletions
diff --git a/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py b/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py index a68175dc4e4d..e9403b56ae19 100644 --- a/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py +++ b/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py @@ -696,6 +696,43 @@ class LinuxCoreTestCase(TestBase): self.expect("register read --all") + @skipIfLLVMTargetMissing("ARM") + def test_arm_core_vfp(self): + # check reading VFP registers + target = self.dbg.CreateTarget(None) + self.assertTrue(target, VALID_TARGET) + process = target.LoadCore("linux-arm-vfp.core") + + values = { + "d0": "0.5", + "d1": "1.5", + "d14": "14.5", + "d15": "15.5", + "s4": "4.5", + "s5": "5.5", + "s6": "6.5", + "s7": "7.5", + "fpscr": "0x20000000", + # s0 and s1 overlap d0, s2 and s3 overlap d1 and so on. Therefore, + # the following values are not as neat as those in the explicitly + # set registers. + "s0": "0", + "s1": "1.75", + "s2": "0", + "s3": "1.9375", + "s28": "0", + "s29": "2.703125", + "s30": "0", + "s31": "2.734375", + } + for regname, value in values.items(): + self.expect( + "register read {}".format(regname), + substrs=["{} = {}".format(regname, value)], + ) + + self.expect("register read --all") + @skipIfLLVMTargetMissing("RISCV") def test_riscv64_regs_gpr_fpr(self): # check basic registers using 64 bit RISC-V core file diff --git a/lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py b/lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py index 020a226924ea..497b8e8a19a8 100644 --- a/lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py +++ b/lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py @@ -37,7 +37,7 @@ class GCoreTestCase(TestBase): for thread in process: reason = thread.GetStopReason() self.assertStopReason(reason, lldb.eStopReasonSignal) - signal = thread.GetStopReasonDataAtIndex(1) + signal = thread.GetStopReasonDataAtIndex(0) # Check we got signal 19 (SIGSTOP) self.assertEqual(signal, 19) diff --git a/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.c b/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.c new file mode 100644 index 000000000000..afc1dce04f9a --- /dev/null +++ b/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.c @@ -0,0 +1,24 @@ +// linux-arm-vfp.core was generated with: +// > gcc-12 -march=armv7+fp -nostdlib -static -Wl,--build-id=none \ +// linux-arm-vfp.c -o linux-arm-vfp.out +// > ulimit -c 1000 +// > ulimit -s 8 +// > env -i ./linux-arm-vfp.out + +static void foo(char *boom) { + asm volatile(R"( + vmov.f64 d0, #0.5 + vmov.f64 d1, #1.5 + vmov.f64 d14, #14.5 + vmov.f64 d15, #15.5 + vmov.f32 s4, #4.5 + vmov.f32 s5, #5.5 + vmov.f32 s6, #6.5 + vmov.f32 s7, #7.5 + vcmp.f32 s7, s6 + )"); + + *boom = 47; +} + +void _start(void) { foo(0); } diff --git a/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.core b/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.core Binary files differnew file mode 100644 index 000000000000..217ba18fdf6d --- /dev/null +++ b/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.core diff --git a/lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py b/lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py index 4a848d1c2eb9..6d9aef286a79 100644 --- a/lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py +++ b/lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py @@ -91,7 +91,7 @@ class LinuxCoreThreadsTestCase(TestBase): reason = thread.GetStopReason() if thread.GetThreadID() == tid: self.assertStopReason(reason, lldb.eStopReasonSignal) - signal = thread.GetStopReasonDataAtIndex(1) + signal = thread.GetStopReasonDataAtIndex(0) # Check we got signal 4 (SIGILL) self.assertEqual(signal, 4) else: |
