llvm-project/lldb/source/Plugins/Platform
David Spickett 9db2541d4c [lldb][AArch64] Add UnwindPlan for Linux sigreturn
This adds a specific unwind plan for AArch64 Linux sigreturn frames.
Previously we assumed that the fp would be valid here but it is not.

https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/vdso/sigreturn.S

On Ubuntu Bionic it happened to point to an old frame info which meant
you got what looked like a correct backtrace. On Focal, the info is
completely invalid. (probably due to some code shuffling in libc)

This adds an UnwindPlan that knows that the sp in a sigreturn frame
points to an rt_sigframe from which we can offset to get saved
sp and pc values to backtrace correctly.

Based on LibUnwind's change: https://reviews.llvm.org/D90898

A new test is added that sets all compares the frames from the initial
signal catch to the handler break. Ensuring that the stack/frame pointer,
function name and register values match.
(this test is AArch64 Linux specific because it's the only one
with a specific unwind plan for this situation)

Fixes https://bugs.llvm.org/show_bug.cgi?id=52165

Reviewed By: omjavaid, labath

Differential Revision: https://reviews.llvm.org/D112069
2021-11-11 11:32:06 +00:00
..
Android [lldb] Remove ConstString from Platform plugin names 2021-10-26 10:04:35 +02:00
FreeBSD [lldb] Remove ConstString from Platform plugin names 2021-10-26 10:04:35 +02:00
Linux [lldb][AArch64] Add UnwindPlan for Linux sigreturn 2021-11-11 11:32:06 +00:00
MacOSX [lldb] Fix C2360: initialization of 'identifier' is skipped by 'case' label 2021-11-05 23:09:35 -07:00
NetBSD [lldb] Remove ConstString from Platform plugin names 2021-10-26 10:04:35 +02:00
OpenBSD [lldb] Remove ConstString from Platform plugin names 2021-10-26 10:04:35 +02:00
POSIX [lldb] Return StringRef from PluginInterface::GetPluginName 2021-10-18 10:14:42 +02:00
Windows [lldb] Remove ConstString from Platform plugin names 2021-10-26 10:04:35 +02:00
gdb-server Modernize Platform::GetOSKernelDescription 2021-10-27 10:46:47 +02:00
CMakeLists.txt [lldb] Clean up Platform/CMakeLists.txt 2021-09-10 14:18:41 +02:00