[lldb] [test/Register] Initial tests for regsets in core dumps
authorMichał Górny <mgorny@moritz.systems>
Mon, 23 Nov 2020 13:24:54 +0000 (14:24 +0100)
committerMichał Górny <mgorny@moritz.systems>
Wed, 21 Apr 2021 17:41:09 +0000 (19:41 +0200)
commite414ede2cd54b03f3ff7d547132f06d1b836e5bb
tree3147851254dad455d2f7ad494de7c5e0c9b2e7ff
parentab9c21bbab38cd8e3abdc2226a02d67b3327207c
[lldb] [test/Register] Initial tests for regsets in core dumps

Add initial tests for reading register sets from core dumps.  This
includes a C++ program to write registers and dump core, resulting core
dumps for Linux, FreeBSD and NetBSD, and the tests to verify them.

The tests are split into generic part, verifying user-specified register
values, and coredump-specific tests that verify memory addresses that
differ for every dump.

At this moment, all platforms support GPRs and FPRs up to XMM for amd64
target.  The i386 target does not work on NetBSD at all, and is missing
FPRs entirely on FreeBSD.

Differential Revision: https://reviews.llvm.org/D91963
25 files changed:
lldb/test/Shell/Register/Core/Inputs/strip-coredump.py [new file with mode: 0755]
lldb/test/Shell/Register/Core/Inputs/x86-32-freebsd.core [new file with mode: 0644]
lldb/test/Shell/Register/Core/Inputs/x86-32-gp.check [new file with mode: 0644]
lldb/test/Shell/Register/Core/Inputs/x86-32-linux.core [new file with mode: 0644]
lldb/test/Shell/Register/Core/Inputs/x86-32-netbsd.core [new file with mode: 0644]
lldb/test/Shell/Register/Core/Inputs/x86-64-freebsd.core [new file with mode: 0644]
lldb/test/Shell/Register/Core/Inputs/x86-64-gp-hixmm.check [new file with mode: 0644]
lldb/test/Shell/Register/Core/Inputs/x86-64-linux.core [new file with mode: 0644]
lldb/test/Shell/Register/Core/Inputs/x86-64-netbsd.core [new file with mode: 0644]
lldb/test/Shell/Register/Core/Inputs/x86-core-dump.cpp [new file with mode: 0644]
lldb/test/Shell/Register/Core/Inputs/x86-fp.check [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-32-freebsd-addr.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-32-freebsd-gp.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-32-linux-addr.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-32-linux-fp.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-32-linux-gp.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-64-freebsd-addr.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-64-freebsd-fp.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-64-freebsd-gp.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-64-linux-addr.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-64-linux-fp.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-64-linux-gp.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-64-netbsd-addr.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-64-netbsd-fp.test [new file with mode: 0644]
lldb/test/Shell/Register/Core/x86-64-netbsd-gp.test [new file with mode: 0644]