xref: /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.h (revision 81ad626541db97eb356e2c1d4a20eb2a26a766ab)
10b57cec5SDimitry Andric //===-- sanitizer_symbolizer_mac.h ------------------------------*- C++ -*-===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric //
90b57cec5SDimitry Andric // This file is shared between various sanitizers' runtime libraries.
100b57cec5SDimitry Andric //
110b57cec5SDimitry Andric // Header for Mac-specific "atos" symbolizer.
120b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
130b57cec5SDimitry Andric 
140b57cec5SDimitry Andric #ifndef SANITIZER_SYMBOLIZER_MAC_H
150b57cec5SDimitry Andric #define SANITIZER_SYMBOLIZER_MAC_H
160b57cec5SDimitry Andric 
170b57cec5SDimitry Andric #include "sanitizer_platform.h"
18*81ad6265SDimitry Andric #if SANITIZER_APPLE
190b57cec5SDimitry Andric 
200b57cec5SDimitry Andric #include "sanitizer_symbolizer_internal.h"
210b57cec5SDimitry Andric 
220b57cec5SDimitry Andric namespace __sanitizer {
230b57cec5SDimitry Andric 
24e8d8bef9SDimitry Andric class DlAddrSymbolizer final : public SymbolizerTool {
250b57cec5SDimitry Andric  public:
260b57cec5SDimitry Andric   bool SymbolizePC(uptr addr, SymbolizedStack *stack) override;
270b57cec5SDimitry Andric   bool SymbolizeData(uptr addr, DataInfo *info) override;
280b57cec5SDimitry Andric };
290b57cec5SDimitry Andric 
300b57cec5SDimitry Andric class AtosSymbolizerProcess;
310b57cec5SDimitry Andric 
32e8d8bef9SDimitry Andric class AtosSymbolizer final : public SymbolizerTool {
330b57cec5SDimitry Andric  public:
340b57cec5SDimitry Andric   explicit AtosSymbolizer(const char *path, LowLevelAllocator *allocator);
350b57cec5SDimitry Andric 
360b57cec5SDimitry Andric   bool SymbolizePC(uptr addr, SymbolizedStack *stack) override;
370b57cec5SDimitry Andric   bool SymbolizeData(uptr addr, DataInfo *info) override;
380b57cec5SDimitry Andric 
390b57cec5SDimitry Andric  private:
400b57cec5SDimitry Andric   AtosSymbolizerProcess *process_;
410b57cec5SDimitry Andric };
420b57cec5SDimitry Andric 
430b57cec5SDimitry Andric } // namespace __sanitizer
440b57cec5SDimitry Andric 
45*81ad6265SDimitry Andric #endif  // SANITIZER_APPLE
460b57cec5SDimitry Andric 
470b57cec5SDimitry Andric #endif // SANITIZER_SYMBOLIZER_MAC_H
48