1 //===-- sanitizer_symbolizer_rtems.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 RTEMS's string formats and limits for the markup symbolizer. 11 //===----------------------------------------------------------------------===// 12 #ifndef SANITIZER_SYMBOLIZER_RTEMS_H 13 #define SANITIZER_SYMBOLIZER_RTEMS_H 14 15 #include "sanitizer_internal_defs.h" 16 17 namespace __sanitizer { 18 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. 22 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. 26 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. 30 31 // Global variable name or equivalent from data memory address. 32 constexpr const char *kFormatData = "{{{data:%p}}}"; 33 34 // One frame in a backtrace (printed on a line by itself). 35 constexpr const char *kFormatFrame = " [%u] IP: %p"; 36 37 } // namespace __sanitizer 38 39 #endif // SANITIZER_SYMBOLIZER_RTEMS_H 40