xref: /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.h (revision ae7e8a02e6e93455e026036132c4d053b2c12ad9)
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 
14 #ifndef SANITIZER_SYMBOLIZER_MAC_H
15 #define SANITIZER_SYMBOLIZER_MAC_H
16 
17 #include "sanitizer_platform.h"
18 #if SANITIZER_MAC
19 
20 #include "sanitizer_symbolizer_internal.h"
21 
22 namespace __sanitizer {
23 
24 class DlAddrSymbolizer final : public SymbolizerTool {
25  public:
26   bool SymbolizePC(uptr addr, SymbolizedStack *stack) override;
27   bool SymbolizeData(uptr addr, DataInfo *info) override;
28 };
29 
30 class AtosSymbolizerProcess;
31 
32 class AtosSymbolizer final : public SymbolizerTool {
33  public:
34   explicit AtosSymbolizer(const char *path, LowLevelAllocator *allocator);
35 
36   bool SymbolizePC(uptr addr, SymbolizedStack *stack) override;
37   bool SymbolizeData(uptr addr, DataInfo *info) override;
38   void LateInitialize() override;
39 
40  private:
41   AtosSymbolizerProcess *process_;
42 };
43 
44 } // namespace __sanitizer
45 
46 #endif  // SANITIZER_MAC
47 
48 #endif // SANITIZER_SYMBOLIZER_MAC_H
49