Support Linux signal return trampolines in frame initialization
authorJoseph Tremoulet <jotrem@microsoft.com>
Fri, 19 Jul 2019 14:05:55 +0000 (14:05 +0000)
committerJoseph Tremoulet <jotrem@microsoft.com>
Fri, 19 Jul 2019 14:05:55 +0000 (14:05 +0000)
commit3fd917d8860e9bdcabc14c536da4377307906be0
tree86fceb8a74eaf73a4f2e3c61943131b0dc296e0a
parent9e6a42a1856468e1408c2e07717b71b9cfe1c86a
Support Linux signal return trampolines in frame initialization

Summary:
Add __kernel_rt_sigreturn to the list of trap handlers for Linux (it's
used as such on aarch64 at least), and __restore_rt as well (used on
x86_64).

Skip decrement-and-recompute for trap handlers in
InitializeNonZerothFrame, as signal dispatch may point the child frame's
return address to the start of the return trampoline.

Parse the 'S' flag for signal handlers from eh_frame augmentation, and
propagate it to the unwind plan.

Reviewers: labath, jankratochvil, compnerd, jfb, jasonmolenda

Reviewed By: jasonmolenda

Subscribers: clayborg, MaskRay, wuzish, nemanjai, kbarton, jrtc27, atanasyan, jsji, javed.absar, kristof.beyls, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D63667

llvm-svn: 366580
28 files changed:
lldb/include/lldb/Symbol/UnwindPlan.h
lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/Makefile [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/TestHandleAbort.py [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/main.c [new file with mode: 0644]
lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp
lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
lldb/source/Symbol/ArmUnwindInfo.cpp
lldb/source/Symbol/CompactUnwindInfo.cpp
lldb/source/Symbol/DWARFCallFrameInfo.cpp