1 1.1 mrg //===-- sanitizer_symbolizer_fuchsia.h -----------------------------------===// 2 1.1 mrg // 3 1.1.1.2 mrg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 1.1.1.2 mrg // See https://llvm.org/LICENSE.txt for license information. 5 1.1.1.2 mrg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 1.1 mrg // 7 1.1 mrg //===----------------------------------------------------------------------===// 8 1.1 mrg // 9 1.1 mrg // This file is shared between various sanitizers' runtime libraries. 10 1.1 mrg // 11 1.1 mrg // Define Fuchsia's string formats and limits for the markup symbolizer. 12 1.1 mrg //===----------------------------------------------------------------------===// 13 1.1 mrg #ifndef SANITIZER_SYMBOLIZER_FUCHSIA_H 14 1.1 mrg #define SANITIZER_SYMBOLIZER_FUCHSIA_H 15 1.1 mrg 16 1.1 mrg #include "sanitizer_internal_defs.h" 17 1.1 mrg 18 1.1 mrg namespace __sanitizer { 19 1.1 mrg 20 1.1 mrg // See the spec at: 21 1.1 mrg // https://fuchsia.googlesource.com/zircon/+/master/docs/symbolizer_markup.md 22 1.1 mrg 23 1.1 mrg // This is used by UBSan for type names, and by ASan for global variable names. 24 1.1 mrg constexpr const char *kFormatDemangle = "{{{symbol:%s}}}"; 25 1.1 mrg constexpr uptr kFormatDemangleMax = 1024; // Arbitrary. 26 1.1 mrg 27 1.1 mrg // Function name or equivalent from PC location. 28 1.1 mrg constexpr const char *kFormatFunction = "{{{pc:%p}}}"; 29 1.1 mrg constexpr uptr kFormatFunctionMax = 64; // More than big enough for 64-bit hex. 30 1.1 mrg 31 1.1 mrg // Global variable name or equivalent from data memory address. 32 1.1 mrg constexpr const char *kFormatData = "{{{data:%p}}}"; 33 1.1 mrg 34 1.1 mrg // One frame in a backtrace (printed on a line by itself). 35 1.1 mrg constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; 36 1.1 mrg 37 1.1.1.2 mrg // Dump trigger element. 38 1.1.1.2 mrg #define FORMAT_DUMPFILE "{{{dumpfile:%s:%s}}}" 39 1.1.1.2 mrg 40 1.1 mrg } // namespace __sanitizer 41 1.1 mrg 42 1.1 mrg #endif // SANITIZER_SYMBOLIZER_FUCHSIA_H 43