Part of http://reviews.llvm.org/D7827. This patch transforms ExternalSymbolizerInterface into SymbolizerTool and makes it a more high-level interface that (eventually) all symbolizer tools should implement. This makes both the formatting of the input and parsing of the output be the responsibility of the individual tool. For now, we make LLVMSymbolizer, Addr2LinePool and InternalSymbolizer be the implementations of this interface (I'll do LibbacktraceSymbolizer in a next step).
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM, but please address all the comments below before committing (there's a bug introduced in InteranalSymbolizer, so be careful). Keep an eye on WinSymbolizer - looks like we will be able to inherit it from SymbolizerTool as well, make our current "POSIXSymbolizer" class the only class implementing "Symbolizer" interface, and get rid of the latter.
Thanks for doing this!
lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc | ||
---|---|---|
373 | if (const char *res = SendCommand(...)) { ParseSymbolizePCOutput(res, stack); return true; } return false; | |
380 | same here | |
435 | same here | |
498 | Here you should call __sanitizer_symbolize_code | |
505 | And here - __sanitizer_symbolize_data | |
577 | if (SymbolizerTool *tool = GetSymbolizerTool()) { ... } | |
601 | same here |