[Windows] Use llvm-symbolizer before using dbghelp
authorReid Kleckner <rnk@google.com>
Tue, 11 Aug 2015 15:51:40 +0000 (15:51 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 11 Aug 2015 15:51:40 +0000 (15:51 +0000)
commit7d9e1e125930404a7ebce2e8d584b34a9065d530
tree41e0a50188ff1cf634f84ced36f4fe0e4f42d7ad
parent863bfdbfb446adaef767ff514d1f2ffb5d489562
[Windows] Use llvm-symbolizer before using dbghelp

Summary:
llvm-symbolizer understands both PDBs and DWARF, so it's a better bet if
it's available. It prints out the function parameter types and column
numbers, so I needed to churn the expected test output a bit.

This makes most of the llvm-symbolizer subprocessing code
target-independent. Pipes on all platforms use fd_t, and we can use the
portable ReadFromFile / WriteToFile wrappers in symbolizer_sanitizer.cc.
Only the pipe creation and process spawning is Windows-specific.

Please check that the libcdep layering is still correct. I don't know
how to reproduce the build configuration that relies on that.

Reviewers: samsonov

Subscribers: llvm-commits

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

llvm-svn: 244616
12 files changed:
compiler-rt/lib/sanitizer_common/CMakeLists.txt
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_process_libcdep.cc [deleted file]
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.h [deleted file]
compiler-rt/test/asan/CMakeLists.txt
compiler-rt/test/asan/TestCases/Windows/fuse-lld.cc [new file with mode: 0644]
compiler-rt/test/asan/TestCases/Windows/null_deref.cc
compiler-rt/test/asan/TestCases/Windows/report_after_syminitialize.cc