[llvm-symbolizer] Make --relative-address work with DWARF contexts
authorReid Kleckner <rnk@google.com>
Fri, 9 Oct 2015 00:15:01 +0000 (00:15 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 9 Oct 2015 00:15:01 +0000 (00:15 +0000)
commit27a9e1dbcf5d0fdf2457c10fecd089a8c02cdec5
treeb899e2bbb7645d6f2a6a7d135bd71558733d3654
parent4100fc009b56a849ea878b6e0375caa5992ba91b
[llvm-symbolizer] Make --relative-address work with DWARF contexts

Summary:
Previously the relative address flag only affected PDB debug info.  Now
both DIContext implementations always expect to be passed virtual
addresses. llvm-symbolizer is now responsible for adding ImageBase to
module offsets when --relative-offset is passed.

Reviewers: zturner

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12883

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249784 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/PDB/PDBContext.h
include/llvm/Object/COFF.h
lib/DebugInfo/PDB/PDBContext.cpp
lib/Object/COFFObjectFile.cpp
test/tools/llvm-symbolizer/Inputs/coff-dwarf.cpp [new file with mode: 0644]
test/tools/llvm-symbolizer/Inputs/coff-dwarf.exe [new file with mode: 0644]
test/tools/llvm-symbolizer/Inputs/coff-dwarf.input [new file with mode: 0644]
test/tools/llvm-symbolizer/coff-dwarf.test [new file with mode: 0644]
test/tools/llvm-symbolizer/pdb/pdb.test
tools/llvm-symbolizer/LLVMSymbolize.cpp
tools/llvm-symbolizer/LLVMSymbolize.h