1 //===-- sanitizer_symbolizer_rtems.h -----------------------------------===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is shared between various sanitizers' runtime libraries.
10 // Define RTEMS's string formats and limits for the markup symbolizer.
11 //===----------------------------------------------------------------------===//
12 #ifndef SANITIZER_SYMBOLIZER_RTEMS_H
13 #define SANITIZER_SYMBOLIZER_RTEMS_H
15 #include "sanitizer_internal_defs.h"
17 namespace __sanitizer
{
19 // The Myriad RTEMS symbolizer currently only parses backtrace lines,
20 // so use a format that the symbolizer understands. For other
21 // markups, keep them the same as the Fuchsia's.
23 // This is used by UBSan for type names, and by ASan for global variable names.
24 constexpr const char *kFormatDemangle
= "{{{symbol:%s}}}";
25 constexpr uptr kFormatDemangleMax
= 1024; // Arbitrary.
27 // Function name or equivalent from PC location.
28 constexpr const char *kFormatFunction
= "{{{pc:%p}}}";
29 constexpr uptr kFormatFunctionMax
= 64; // More than big enough for 64-bit hex.
31 // Global variable name or equivalent from data memory address.
32 constexpr const char *kFormatData
= "{{{data:%p}}}";
34 // One frame in a backtrace (printed on a line by itself).
35 constexpr const char *kFormatFrame
= " [%u] IP: %p";
37 } // namespace __sanitizer
39 #endif // SANITIZER_SYMBOLIZER_RTEMS_H