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