From d8519f4a7db902d0199206f554e442d0e30fed35 Mon Sep 17 00:00:00 2001 From: Michal Gorny Date: Mon, 1 Apr 2019 15:08:24 +0000 Subject: [lldb] [Process/elf-core] Support aarch64 NetBSD core dumps Include support for NetBSD core dumps from evbarm/aarch64 system, and matching test cases for them. Based on earlier work by Kamil Rytarowski. Differential Revision: https://reviews.llvm.org/D60034 llvm-svn: 357399 --- .../postmortem/netbsd-core/1lwp_SIGSEGV.aarch64 | Bin 0 -> 9088 bytes .../postmortem/netbsd-core/1lwp_SIGSEGV.aarch64.core | Bin 0 -> 225728 bytes .../netbsd-core/2lwp_process_SIGSEGV.aarch64 | Bin 0 -> 13192 bytes .../netbsd-core/2lwp_process_SIGSEGV.aarch64.core | Bin 0 -> 246936 bytes .../postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64 | Bin 0 -> 11848 bytes .../netbsd-core/2lwp_t2_SIGSEGV.aarch64.core | Bin 0 -> 251904 bytes .../postmortem/netbsd-core/TestNetBSDCore.py | 15 +++++++++++++++ 7 files changed, 15 insertions(+) create mode 100755 lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64 create mode 100644 lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64.core create mode 100755 lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64 create mode 100644 lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64.core create mode 100755 lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64 create mode 100644 lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64.core (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/postmortem') diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64 b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64 new file mode 100755 index 00000000000..de0208c756d Binary files /dev/null and b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64 differ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64.core b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64.core new file mode 100644 index 00000000000..daee798e19c Binary files /dev/null and b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64.core differ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64 b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64 new file mode 100755 index 00000000000..8781f033c5a Binary files /dev/null and b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64 differ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64.core b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64.core new file mode 100644 index 00000000000..b58c97c3388 Binary files /dev/null and b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64.core differ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64 b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64 new file mode 100755 index 00000000000..89394a7c084 Binary files /dev/null and b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64 differ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64.core b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64.core new file mode 100644 index 00000000000..b268e05a2ae Binary files /dev/null and b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64.core differ diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py index 6d3037417a9..320a5666b33 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py @@ -168,6 +168,11 @@ class NetBSD1LWPCoreTestCase(NetBSDCoreCommonTestCase): backtrace = ["bar", "foo", "main"] self.check_backtrace(thread, filename, backtrace) + @skipIfLLVMTargetMissing("AArch64") + def test_aarch64(self): + """Test single-threaded aarch64 core dump.""" + self.do_test("1lwp_SIGSEGV.aarch64", pid=8339, region_count=32) + @skipIfLLVMTargetMissing("X86") def test_amd64(self): """Test single-threaded amd64 core dump.""" @@ -193,6 +198,11 @@ class NetBSD2LWPT2CoreTestCase(NetBSDCoreCommonTestCase): self.assertEqual(thread.GetStopReasonDataCount(), 1) self.assertEqual(thread.GetStopReasonDataAtIndex(0), 0) + @skipIfLLVMTargetMissing("AArch64") + def test_aarch64(self): + """Test double-threaded aarch64 core dump where thread 2 is signalled.""" + self.do_test("2lwp_t2_SIGSEGV.aarch64", pid=14142, region_count=31) + @skipIfLLVMTargetMissing("X86") def test_amd64(self): """Test double-threaded amd64 core dump where thread 2 is signalled.""" @@ -218,6 +228,11 @@ class NetBSD2LWPProcessSigCoreTestCase(NetBSDCoreCommonTestCase): self.assertEqual(thread.GetStopReasonDataCount(), 1) self.assertEqual(thread.GetStopReasonDataAtIndex(0), signal.SIGSEGV) + @skipIfLLVMTargetMissing("AArch64") + def test_aarch64(self): + """Test double-threaded aarch64 core dump where process is signalled.""" + self.do_test("2lwp_process_SIGSEGV.aarch64", pid=1403, region_count=30) + @skipIfLLVMTargetMissing("X86") def test_amd64(self): """Test double-threaded amd64 core dump where process is signalled.""" -- cgit v1.2.3