1 //===-- backtrace.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 #ifndef GWP_ASAN_OPTIONAL_BACKTRACE_H_
10 #define GWP_ASAN_OPTIONAL_BACKTRACE_H_
11 
12 #include "gwp_asan/options.h"
13 
14 namespace gwp_asan {
15 namespace options {
16 // Functions to get the platform-specific and implementation-specific backtrace
17 // and backtrace printing functions when RTGwpAsanBacktraceLibc or
18 // RTGwpAsanBacktraceSanitizerCommon are linked. Use these functions to get the
19 // backtrace function for populating the Options::Backtrace and
20 // Options::PrintBacktrace when initialising the GuardedPoolAllocator. Please
21 // note any thread-safety descriptions for the implementation of these functions
22 // that you use.
23 Backtrace_t getBacktraceFunction();
24 PrintBacktrace_t getPrintBacktraceFunction();
25 } // namespace options
26 } // namespace gwp_asan
27 
28 #endif // GWP_ASAN_OPTIONAL_BACKTRACE_H_
29