[PATCH] [compiler-rt] Symbolizer refactoring: Make WinSymbolizer use SymbolizerTool interface
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12501 bytes
Desc: not available
More information about the llvm-commits