diff options
author | Kuba Brecka <kuba.brecka@gmail.com> | 2015-02-27 11:11:05 +0000 |
---|---|---|
committer | Kuba Brecka <kuba.brecka@gmail.com> | 2015-02-27 11:11:05 +0000 |
commit | f80ca1751bba0ef9eeec3456c0cc9ff5abef1454 (patch) | |
tree | f30376def4f19ef5224d4d5370bf7ffe27a09408 /lib/sanitizer_common/sanitizer_symbolizer.h | |
parent | 71171cbbb3ace76baceb7a889cdb30ed7ab027bd (diff) |
[compiler-rt] Symbolizer refactoring: Abstract SymbolizerProcess better
Reviewed at http://reviews.llvm.org/D7889
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230749 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_symbolizer.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_symbolizer.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/sanitizer_common/sanitizer_symbolizer.h b/lib/sanitizer_common/sanitizer_symbolizer.h index 3a807744d..25c7034fd 100644 --- a/lib/sanitizer_common/sanitizer_symbolizer.h +++ b/lib/sanitizer_common/sanitizer_symbolizer.h @@ -141,8 +141,8 @@ class ExternalSymbolizerInterface { public: // Can't declare pure virtual functions in sanitizer runtimes: // __cxa_pure_virtual might be unavailable. - virtual char *SendCommand(bool is_data, const char *module_name, - uptr module_offset) { + virtual const char *SendCommand(bool is_data, const char *module_name, + uptr module_offset) { UNIMPLEMENTED(); } }; @@ -150,26 +150,18 @@ class ExternalSymbolizerInterface { // SymbolizerProcess encapsulates communication between the tool and // external symbolizer program, running in a different subprocess. // SymbolizerProcess may not be used from two threads simultaneously. -class SymbolizerProcess : public ExternalSymbolizerInterface { +class SymbolizerProcess { public: explicit SymbolizerProcess(const char *path); - char *SendCommand(bool is_data, const char *module_name, - uptr module_offset) override; + const char *SendCommand(const char *command); private: bool Restart(); - char *SendCommandImpl(bool is_data, const char *module_name, - uptr module_offset); + const char *SendCommandImpl(const char *command); bool ReadFromSymbolizer(char *buffer, uptr max_length); bool WriteToSymbolizer(const char *buffer, uptr length); bool StartSymbolizerSubprocess(); - virtual bool RenderInputCommand(char *buffer, uptr max_length, bool is_data, - const char *module_name, - uptr module_offset) const { - UNIMPLEMENTED(); - } - virtual bool ReachedEndOfOutput(const char *buffer, uptr length) const { UNIMPLEMENTED(); } |