Go to file
Aleksandr Urakov 30c2441a32 [Windows] Use information from the PE32 exceptions directory to construct unwind plans
This patch adds an implementation of unwinding using PE EH info. It allows to
get almost ideal call stacks on 64-bit Windows systems (except some epilogue
cases, but I believe that they can be fixed with unwind plan disassembly
augmentation in the future).

To achieve the goal the CallFrameInfo abstraction was made. It is based on the
DWARFCallFrameInfo class interface with a few changes to make it less
DWARF-specific.

To implement the new interface for PECOFF object files the class PECallFrameInfo
was written. It uses the next helper classes:

- UnwindCodesIterator helps to iterate through UnwindCode structures (and
  processes chained infos transparently);
- EHProgramBuilder with the use of UnwindCodesIterator constructs EHProgram;
- EHProgram is, by fact, a vector of EHInstructions. It creates an abstraction
  over the low-level unwind codes and simplifies work with them. It contains
  only the information that is relevant to unwinding in the unified form. Also
  the required unwind codes are read from the object file only once with it;
- EHProgramRange allows to take a range of EHProgram and to build an unwind row
  for it.

So, PECallFrameInfo builds the EHProgram with EHProgramBuilder, takes the ranges
corresponding to every offset in prologue and builds the rows of the resulted
unwind plan. The resulted plan covers the whole range of the function except the
epilogue.

Reviewers: jasonmolenda, asmith, amccarth, clayborg, JDevlieghere, stella.stamenova, labath, espindola

Reviewed By: jasonmolenda

Subscribers: leonid.mashinskiy, emaste, mgorny, aprantl, arichardson, MaskRay, lldb-commits, llvm-commits

Tags: #lldb

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

llvm-svn: 374528
2019-10-11 09:03:29 +00:00
clang Insert module constructors in a module pass 2019-10-11 08:47:03 +00:00
clang-tools-extra Get ClangdXPC.framework building (barely) with CMake's Xcode generator 2019-10-11 01:23:56 +00:00
compiler-rt Fix check-interception link error in compiler-rt debug mode 2019-10-10 23:30:54 +00:00
debuginfo-tests Make nrvo-string test more robust. 2019-06-27 20:38:37 +00:00
libc Use arrays on stack and avoid use of new and delete operators. 2019-10-10 16:06:21 +00:00
libclc travis: Add LLVM 9 build 2019-09-27 05:58:15 +00:00
libcxx [libc++] Fix linker script generation 2019-10-11 04:54:35 +00:00
libcxxabi [libc++abi] Introduce a LIBCXXABI_LIBRARY_VERSION option 2019-10-07 19:22:04 +00:00
libunwind [libunwind] Adjust libunwind_01.pass.cpp test for ARM EHABI 2019-10-03 17:01:04 +00:00
lld Change test case so that it accepts backslashes in file path, in the case that the test runs on Windows 2019-10-10 23:35:53 +00:00
lldb [Windows] Use information from the PE32 exceptions directory to construct unwind plans 2019-10-11 09:03:29 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm [Windows] Use information from the PE32 exceptions directory to construct unwind plans 2019-10-11 09:03:29 +00:00
openmp [OpenMP] Enable thread affinity on FreeBSD 2019-10-08 21:25:30 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly [Polly] Fix formatting violation. NFC. 2019-10-11 03:09:24 +00:00
pstl [pstl] Allow customizing whether per-TU insulation is provided 2019-08-13 12:49:00 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.git-blame-ignore-revs Add LLDB reformatting to .git-blame-ignore-revs 2019-09-04 09:31:55 +00:00
.gitignore Add a newline at the end of the file 2019-09-04 06:33:46 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.