[PATCH] [compiler-rt] Symbolizer refactoring: Make WinSymbolizer use SymbolizerTool interface

Kuba Brecka kuba.brecka at gmail.com
Thu Mar 5 14:10:35 PST 2015


Part of http://reviews.llvm.org/D7827.  This converts most of `WinSymbolizer` into `WinSymbolizerTool`, which uses the common `SymbolizerTool`.  To make the changes more smooth (and patches more readable), I didn't mess up with `POSIXSymbolizer`, yet.  But eventually, I want to "upgrade" POSIXSymbolizer into a cross-platform Symbolizer, that would use `WinSymbolizer` just as any other symbolizer tool.

For the transition, I made a small class that does the same as `POSIXSymbolizer` but for Windows.

One issue with the `WinSymbolizer` is that is uses DbgHelp even for finding module name and offset from an address.  I made it a static function, which also needed the initialization functions to be static and the `initialized_` field global.  The other option would be to add the `FindModuleNameAndOffsetForAddress` into the `SymbolizerTool` interface, which however doesn't sound right to me:  On POSIX, all the symbolizer tools use the same way to finding module names, so it looks like it's more of a platform-specific thing than a tool-specific one.

http://reviews.llvm.org/D8089

Files:
  lib/sanitizer_common/sanitizer_symbolizer_win.cc
  lib/sanitizer_common/sanitizer_symbolizer_win.h

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8089.21313.patch
Type: text/x-patch
Size: 12501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150305/1dae2f88/attachment.bin>


More information about the llvm-commits mailing list