Go to file
Adrian Prantl f796e763b2 DWARFExpression: Resolve file addresses in the linked module
This is a follow-up to https://reviews.llvm.org/D46362.

When evaluating a complex expression in DWARFExpression::Evaluate,
file addresses must be resolved to load addresses before we can
perform operations such as DW_OP_deref on them.

For this the address goes through three steps

1. Read the file address as stored in the DWARF
2. Link/relocate the file address (when reading from a .dSYM, this is a no-op)
3. Convert the file address to a load address.

D46362 implemented step (3) by resolving the file address using the
Module that the original DWARF came from. In the case of a dSYM that
is correct, but when reading from .o files, we need to look up
relocated/linked addresses, so the right place to look them up is the
current frame's module. This patch fixes that by setting the
expression's Module to point to the linked debugmap object.

A word a bout the unorthodox testcase: The motivating testcase for
this fix is in Swift, but I managed to hand-modify LLVM-IR for a
trivial C program to exhibit the same problem, so we can fix this in
llvm.org.

rdar://problem/44689915

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

llvm-svn: 343612
2018-10-02 17:50:42 +00:00
clang [HIP] Support early finalization of device code for -fno-gpu-rdc 2018-10-02 17:48:54 +00:00
clang-tools-extra Revert r343589 "[clangd] Dex: add Corpus factory for iterators, rename, fold constant. NFC" 2018-10-02 17:31:43 +00:00
compiler-rt [lib/fuzzer] Fix logging for Fuchsia 2018-10-02 17:21:04 +00:00
debuginfo-tests Revert "(Retry) Add a basic integration test for C++ smart pointers" 2018-08-20 19:53:33 +00:00
libclc configure: Rework support for gfx9+ devices that were added post LLVM 3.9 2018-09-15 22:02:01 +00:00
libcxx Remove redundant null pointer check in operator delete 2018-10-01 17:21:07 +00:00
libcxxabi Update docs to reference new libc++ mailing lists. 2018-09-22 19:52:12 +00:00
libunwind Reverting r342895 2018-09-24 16:36:33 +00:00
lld [NFC][BUG-FIX][ARM] Add missing data symbol 2018-10-02 16:53:12 +00:00
lldb DWARFExpression: Resolve file addresses in the linked module 2018-10-02 17:50:42 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [codeview] Fix 32-bit x86 variable locations in realigned stack frames 2018-10-02 16:43:52 +00:00
openmp [libomptarget-nvptx] Enable asserts in bclib 2018-10-01 14:16:55 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [IslAst] Fix InParallelFor nesting. 2018-09-27 13:39:37 +00:00
README.md

README.md

Low Level Virtual Machine (LLVM)

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