1336817Sdim//===-- sanitizer_symbolizer_fuchsia.h -----------------------------------===// 2336817Sdim// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6336817Sdim// 7336817Sdim//===----------------------------------------------------------------------===// 8336817Sdim// 9336817Sdim// This file is shared between various sanitizers' runtime libraries. 10336817Sdim// 11336817Sdim// Define Fuchsia's string formats and limits for the markup symbolizer. 12336817Sdim//===----------------------------------------------------------------------===// 13336817Sdim#ifndef SANITIZER_SYMBOLIZER_FUCHSIA_H 14336817Sdim#define SANITIZER_SYMBOLIZER_FUCHSIA_H 15336817Sdim 16336817Sdim#include "sanitizer_internal_defs.h" 17336817Sdim 18336817Sdimnamespace __sanitizer { 19336817Sdim 20336817Sdim// See the spec at: 21336817Sdim// https://fuchsia.googlesource.com/zircon/+/master/docs/symbolizer_markup.md 22336817Sdim 23336817Sdim// This is used by UBSan for type names, and by ASan for global variable names. 24336817Sdimconstexpr const char *kFormatDemangle = "{{{symbol:%s}}}"; 25336817Sdimconstexpr uptr kFormatDemangleMax = 1024; // Arbitrary. 26336817Sdim 27336817Sdim// Function name or equivalent from PC location. 28336817Sdimconstexpr const char *kFormatFunction = "{{{pc:%p}}}"; 29336817Sdimconstexpr uptr kFormatFunctionMax = 64; // More than big enough for 64-bit hex. 30336817Sdim 31336817Sdim// Global variable name or equivalent from data memory address. 32336817Sdimconstexpr const char *kFormatData = "{{{data:%p}}}"; 33336817Sdim 34336817Sdim// One frame in a backtrace (printed on a line by itself). 35336817Sdimconstexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; 36336817Sdim 37344779Sdim// Dump trigger element. 38344779Sdim#define FORMAT_DUMPFILE "{{{dumpfile:%s:%s}}}" 39344779Sdim 40336817Sdim} // namespace __sanitizer 41336817Sdim 42336817Sdim#endif // SANITIZER_SYMBOLIZER_FUCHSIA_H 43