sanitizer_symbolizer_mac.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //===-- sanitizer_symbolizer_mac.h ------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file is shared between various sanitizers' runtime libraries.
  10. //
  11. // Header for Mac-specific "atos" symbolizer.
  12. //===----------------------------------------------------------------------===//
  13. #ifndef SANITIZER_SYMBOLIZER_MAC_H
  14. #define SANITIZER_SYMBOLIZER_MAC_H
  15. #include "sanitizer_platform.h"
  16. #if SANITIZER_APPLE
  17. #include "sanitizer_symbolizer_internal.h"
  18. namespace __sanitizer {
  19. class DlAddrSymbolizer final : public SymbolizerTool {
  20. public:
  21. bool SymbolizePC(uptr addr, SymbolizedStack *stack) override;
  22. bool SymbolizeData(uptr addr, DataInfo *info) override;
  23. };
  24. class AtosSymbolizerProcess;
  25. class AtosSymbolizer final : public SymbolizerTool {
  26. public:
  27. explicit AtosSymbolizer(const char *path, LowLevelAllocator *allocator);
  28. bool SymbolizePC(uptr addr, SymbolizedStack *stack) override;
  29. bool SymbolizeData(uptr addr, DataInfo *info) override;
  30. private:
  31. AtosSymbolizerProcess *process_;
  32. };
  33. } // namespace __sanitizer
  34. #endif // SANITIZER_APPLE
  35. #endif // SANITIZER_SYMBOLIZER_MAC_H