blob: 62356ef6ef7347d5f9609a29e22695d57d9d1b82 [file] [log] [blame]
Walter Leed8f7b0b2018-05-11 23:52:19 +00001//===-- 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
19namespace __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.
26constexpr const char *kFormatDemangle = "{{{symbol:%s}}}";
27constexpr uptr kFormatDemangleMax = 1024; // Arbitrary.
28
29// Function name or equivalent from PC location.
30constexpr const char *kFormatFunction = "{{{pc:%p}}}";
31constexpr uptr kFormatFunctionMax = 64; // More than big enough for 64-bit hex.
32
33// Global variable name or equivalent from data memory address.
34constexpr const char *kFormatData = "{{{data:%p}}}";
35
36// One frame in a backtrace (printed on a line by itself).
37constexpr const char *kFormatFrame = " [%u] IP: %p";
38
39} // namespace __sanitizer
40
41#endif // SANITIZER_SYMBOLIZER_RTEMS_H