[all-commits] [llvm/llvm-project] fd1bd5: [lldb/aarch64] Fix unwinding when signal interrupt...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Wed May 8 23:47:34 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fd1bd53ba5a06f344698a55578f6a5d79c457e30
https://github.com/llvm/llvm-project/commit/fd1bd53ba5a06f344698a55578f6a5d79c457e30
Author: Pavel Labath <pavel at labath.sk>
Date: 2024-05-09 (Thu, 09 May 2024)
Changed paths:
M lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
M lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
M lldb/source/Target/RegisterContextUnwind.cpp
A lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c
A lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test
M lldb/unittests/UnwindAssembly/ARM64/TestArm64InstEmulation.cpp
Log Message:
-----------
[lldb/aarch64] Fix unwinding when signal interrupts a leaf function (#91321)
A leaf function may not store the link register to stack, but we it can
still end up being a non-zero frame if it gets interrupted by a signal.
Currently, we were unable to unwind past this function because we could
not read the link register value.
To make this work, this patch:
- changes the function-entry unwind plan to include the `fp|lr = <same>`
rules. This in turn necessitated an adjustment in the generic
instruction emulation logic to ensure that `lr=[sp-X]` can override the
`<same>` rule.
- allows the `<same>` rule for pc and lr in all
`m_all_registers_available` frames (and not just frame zero).
The test verifies that we can unwind in a situation like this, and that
the backtrace matches the one we computed before getting a signal.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list