]>
Commit | Line | Data |
---|---|---|
eac97531 ML |
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 | |
14 | ||
15 | #include "sanitizer_internal_defs.h" | |
16 | ||
17 | namespace __sanitizer { | |
18 | ||
19 | // See the spec at: | |
20 | // https://fuchsia.googlesource.com/zircon/+/master/docs/symbolizer_markup.md | |
21 | ||
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. | |
25 | ||
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. | |
29 | ||
30 | // Global variable name or equivalent from data memory address. | |
31 | constexpr const char *kFormatData = "{{{data:%p}}}"; | |
32 | ||
33 | // One frame in a backtrace (printed on a line by itself). | |
34 | constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; | |
35 | ||
36 | } // namespace __sanitizer | |
37 | ||
38 | #endif // SANITIZER_SYMBOLIZER_FUCHSIA_H |