1 //===-- sanitizer_symbolizer_fuchsia.h -----------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is shared between various sanitizers' runtime libraries.
12 // Define Fuchsia's string formats and limits for the markup symbolizer.
13 //===----------------------------------------------------------------------===//
14 #ifndef SANITIZER_SYMBOLIZER_FUCHSIA_H
15 #define SANITIZER_SYMBOLIZER_FUCHSIA_H
17 #include "sanitizer_internal_defs.h"
19 namespace __sanitizer {
22 // https://fuchsia.googlesource.com/zircon/+/master/docs/symbolizer_markup.md
24 // This is used by UBSan for type names, and by ASan for global variable names.
25 constexpr const char *kFormatDemangle = "{{{symbol:%s}}}";
26 constexpr uptr kFormatDemangleMax = 1024; // Arbitrary.
28 // Function name or equivalent from PC location.
29 constexpr const char *kFormatFunction = "{{{pc:%p}}}";
30 constexpr uptr kFormatFunctionMax = 64; // More than big enough for 64-bit hex.
32 // Global variable name or equivalent from data memory address.
33 constexpr const char *kFormatData = "{{{data:%p}}}";
35 // One frame in a backtrace (printed on a line by itself).
36 constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}";
38 } // namespace __sanitizer
40 #endif // SANITIZER_SYMBOLIZER_FUCHSIA_H