hanchenye-llvm-project/libunwind/src
Sterling Augustine d3c744313c Correctly update isSignalFrame when unwinding the stack via dwarf.
A "signal frame" is a function or block of code where execution arrives via a signal or interrupt, rather than via a normal call instruction. In fact, a particular instruction is interrupted by the signal and needs to be restarted. Therefore, when the signal handler is complete, execution needs to return to the interrupted instruction, rather than the instruction immediately following the call instruction, as in a normal call.

Stack unwinders need to know this to correctly unwind signal frames. Dwarf handily provides an "S" in the CIE augmentation string to describe this case, and the libunwind API provides various functions to for unwinders to determine it,.

The llvm libunwind implementation correctly sets it's internal variable "isSignalFrame" when initializing an unwind context. However, upon stepping up the stack, the current implementation correctly reads the augmentation string and sets it in the CIE info (which it then discards), libunwind doesn't update it's internal unwind context data structure.

This change fixes that, and provides compatibility with both the canonical libunwind and the libgcc implementation.

Reviewers: jfb

Subscribers: christof, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D69677
2019-11-07 14:48:35 -08:00
..
AddressSpace.hpp [libunwind] [Windows] Add a log message if EnumProcessModules fails 2019-10-31 09:34:39 +02:00
CMakeLists.txt unwind: restore the LINKER_LANGUAGE 2019-11-06 15:42:09 -08:00
CompactUnwinder.hpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
DwarfInstructions.hpp Correctly update isSignalFrame when unwinding the stack via dwarf. 2019-11-07 14:48:35 -08:00
DwarfParser.hpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
EHHeaderParser.hpp [libunwind] Don't abort if encoutering invalid .eh_frame_hdr 2019-01-24 03:04:42 +00:00
RWMutex.hpp [runtimes] Don't depend on libpthread on Android 2019-07-22 20:41:03 +00:00
Registers.hpp [libunwind] Export the unw_* symbols as weak symbols 2019-04-03 21:50:03 +00:00
Unwind-EHABI.cpp [libunwind][ARM] Fix types in _Unwind_VRS_Get. 2019-07-22 16:43:03 +00:00
Unwind-EHABI.h Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
Unwind-seh.cpp [libunwind] Export the unw_* symbols as weak symbols 2019-04-03 21:50:03 +00:00
Unwind-sjlj.c [libunwind] Export the unw_* symbols as weak symbols 2019-04-03 21:50:03 +00:00
UnwindCursor.hpp Correctly update isSignalFrame when unwinding the stack via dwarf. 2019-11-07 14:48:35 -08:00
UnwindLevel1-gcc-ext.c Correctly update isSignalFrame when unwinding the stack via dwarf. 2019-11-07 14:48:35 -08:00
UnwindLevel1.c [NFC] Correct outdated links to the Itanium C++ ABI documentation 2019-04-11 16:37:07 +00:00
UnwindRegistersRestore.S [libunwind][AArch64] Fix libunwind::Registers_arm64::jumpto 2019-06-17 11:00:21 +00:00
UnwindRegistersSave.S [PPC] Fix 32-bit build of libunwind 2019-05-16 06:49:20 +00:00
Unwind_AppleExtras.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
assembly.h [PPC] Fix 32-bit build of libunwind 2019-05-16 06:49:20 +00:00
config.h [NFC] Move the export attribute after extern "C". 2019-04-12 18:34:19 +00:00
dwarf2.h Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
libunwind.cpp unwind: remove a could of extraneous `else` (NFC) 2019-09-18 16:15:56 +00:00
libunwind_ext.h [libunwind] Export the unw_* symbols as weak symbols 2019-04-03 21:50:03 +00:00