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