[PATCH] Make llvm-symbolizer work on Windows.

Zachary Turner zturner at google.com
Thu Apr 23 14:39:47 PDT 2015


Hi samsonov, timurrrr,

This is a rework of my original patch which introduced a new class hierarchy into llvm-symbolizer.  Now that DIContext has moved to a common layer, this patch simply uses DIContext, resulting in much nicer code in llvm-symbolizer.

Inline frames are not yet supported, so we fall back to just pretending like the option wasn't specified whenever a PDBContext is in use.  Test program:

Here is some program output showing that it works:

d:\testexe>cat test.c
void foo() {
}

int main() {
  foo();
}

d:\testexe>dumpbin /DISASM test.exe | grep "_foo:\|_main:" --after-context=1
_foo:
  00401020: 55                 push        ebp
--
_main:
  00401030: 55                 push        ebp

d:\testexe>d:\src\llvmbuild\ninja\bin\llvm-symbolizer.exe --obj test.exe
0x401020
_foo
d:\testexe\test.c:1:0

0x401030
_main
d:\testexe\test.c:4:0

http://reviews.llvm.org/D9234

Files:
  include/llvm/DebugInfo/PDB/PDBContext.h
  lib/DebugInfo/PDB/CMakeLists.txt
  lib/DebugInfo/PDB/PDBContext.cpp
  tools/llvm-symbolizer/CMakeLists.txt
  tools/llvm-symbolizer/LLVMSymbolize.cpp
  tools/llvm-symbolizer/llvm-symbolizer.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9234.24335.patch
Type: text/x-patch
Size: 10801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150423/130d71f8/attachment.bin>


More information about the llvm-commits mailing list