1 //===-- backtrace_fuchsia.cpp -----------------------------------*- 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 #include "gwp_asan/optional/backtrace.h" 10 11 #include <zircon/sanitizer.h> 12 13 namespace gwp_asan { 14 namespace backtrace { 15 16 // Fuchsia's C library provides safe, fast, best-effort backtraces itself. 17 options::Backtrace_t getBacktraceFunction() { 18 return __sanitizer_fast_backtrace; 19 } 20 21 // These are only used in fatal signal handling, which is not used on Fuchsia. 22 23 PrintBacktrace_t getPrintBacktraceFunction() { return nullptr; } 24 SegvBacktrace_t getSegvBacktraceFunction() { return nullptr; } 25 26 } // namespace backtrace 27 } // namespace gwp_asan 28