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