1 //===-- sanitizer_symbolizer_rtems.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 RTEMS's string formats and limits for the markup symbolizer.
13 //===----------------------------------------------------------------------===//
14 #ifndef SANITIZER_SYMBOLIZER_RTEMS_H
15 #define SANITIZER_SYMBOLIZER_RTEMS_H
17 #include "sanitizer_internal_defs.h"
19 namespace __sanitizer {
21 // The Myriad RTEMS symbolizer currently only parses backtrace lines,
22 // so use a format that the symbolizer understands. For other
23 // markups, keep them the same as the Fuchsia's.
25 // This is used by UBSan for type names, and by ASan for global variable names.
26 constexpr const char *kFormatDemangle = "{{{symbol:%s}}}";
27 constexpr uptr kFormatDemangleMax = 1024; // Arbitrary.
29 // Function name or equivalent from PC location.
30 constexpr const char *kFormatFunction = "{{{pc:%p}}}";
31 constexpr uptr kFormatFunctionMax = 64; // More than big enough for 64-bit hex.
33 // Global variable name or equivalent from data memory address.
34 constexpr const char *kFormatData = "{{{data:%p}}}";
36 // One frame in a backtrace (printed on a line by itself).
37 constexpr const char *kFormatFrame = " [%u] IP: %p";
39 } // namespace __sanitizer
41 #endif // SANITIZER_SYMBOLIZER_RTEMS_H