1336817Sdim//===-- sanitizer_symbolizer_rtems.h -----------------------------------===//
2336817Sdim//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6336817Sdim//
7336817Sdim//===----------------------------------------------------------------------===//
8336817Sdim//
9336817Sdim// This file is shared between various sanitizers' runtime libraries.
10336817Sdim//
11336817Sdim// Define RTEMS's string formats and limits for the markup symbolizer.
12336817Sdim//===----------------------------------------------------------------------===//
13336817Sdim#ifndef SANITIZER_SYMBOLIZER_RTEMS_H
14336817Sdim#define SANITIZER_SYMBOLIZER_RTEMS_H
15336817Sdim
16336817Sdim#include "sanitizer_internal_defs.h"
17336817Sdim
18336817Sdimnamespace __sanitizer {
19336817Sdim
20336817Sdim// The Myriad RTEMS symbolizer currently only parses backtrace lines,
21336817Sdim// so use a format that the symbolizer understands.  For other
22336817Sdim// markups, keep them the same as the Fuchsia's.
23336817Sdim
24336817Sdim// This is used by UBSan for type names, and by ASan for global variable names.
25336817Sdimconstexpr const char *kFormatDemangle = "{{{symbol:%s}}}";
26336817Sdimconstexpr uptr kFormatDemangleMax = 1024;  // Arbitrary.
27336817Sdim
28336817Sdim// Function name or equivalent from PC location.
29336817Sdimconstexpr const char *kFormatFunction = "{{{pc:%p}}}";
30336817Sdimconstexpr uptr kFormatFunctionMax = 64;  // More than big enough for 64-bit hex.
31336817Sdim
32336817Sdim// Global variable name or equivalent from data memory address.
33336817Sdimconstexpr const char *kFormatData = "{{{data:%p}}}";
34336817Sdim
35336817Sdim// One frame in a backtrace (printed on a line by itself).
36336817Sdimconstexpr const char *kFormatFrame = "    [%u] IP: %p";
37336817Sdim
38336817Sdim}  // namespace __sanitizer
39336817Sdim
40336817Sdim#endif  // SANITIZER_SYMBOLIZER_RTEMS_H
41