[PATCH] [compiler-rt] Symbolizer refactoring: Unify access to symbolizer tools from POSIXSymbolizer

Kuba Brecka kuba.brecka at gmail.com
Tue Mar 3 02:49:42 PST 2015


Part of http://reviews.llvm.org/D7827.  The way we select symbolizer tools in sanitizer_symbolizer_posix_libcdep.cc's Symbolizer::PlatformInit currently uses only one (or zero) of them.  And since all the POSIX symbolizers now use the commmon interface, we don't need to special-case the three classes anymore.

To maintain the current behavior, I changed the `Demangle` method in `SymbolizerTool` interface to return `nullptr` by default, which means that `POSIXSymbolizer` will fallback to use `DemangleCXXABI`. And in `SymbolizeData` of `POSIXSymbolizer`, the addition of the module base address (`info->start += module->base_address()`) has been moved into the individual tools, because not all tool parse back a relative offset (libbacktrace already fills in the full address).

http://reviews.llvm.org/D8029

Files:
  lib/sanitizer_common/sanitizer_symbolizer_internal.h
  lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8029.21090.patch
Type: text/x-patch
Size: 7332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150303/f6cd552f/attachment.bin>


More information about the llvm-commits mailing list