1 //===-- sanitizer_symbolizer_rtems.h -----------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file is shared between various sanitizers' runtime libraries. 11 // 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 16 17 #include "sanitizer_internal_defs.h" 18 19 namespace __sanitizer { 20 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. 24 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. 28 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. 32 33 // Global variable name or equivalent from data memory address. 34 constexpr const char *kFormatData = "{{{data:%p}}}"; 35 36 // One frame in a backtrace (printed on a line by itself). 37 constexpr const char *kFormatFrame = " [%u] IP: %p"; 38 39 } // namespace __sanitizer 40 41 #endif // SANITIZER_SYMBOLIZER_RTEMS_H 42