Reset prologue_location before calling code_end
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_symbolizer_rtems.h
blob3371092e0687599f374a4cd1477e52c504f1b418
1 //===-- sanitizer_symbolizer_rtems.h -----------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is shared between various sanitizers' runtime libraries.
11 // Define RTEMS's string formats and limits for the markup symbolizer.
12 //===----------------------------------------------------------------------===//
13 #ifndef SANITIZER_SYMBOLIZER_RTEMS_H
14 #define SANITIZER_SYMBOLIZER_RTEMS_H
16 #include "sanitizer_internal_defs.h"
18 namespace __sanitizer {
20 // The Myriad RTEMS symbolizer currently only parses backtrace lines,
21 // so use a format that the symbolizer understands. For other
22 // markups, keep them the same as the Fuchsia's.
24 // This is used by UBSan for type names, and by ASan for global variable names.
25 constexpr const char *kFormatDemangle = "{{{symbol:%s}}}";
26 constexpr uptr kFormatDemangleMax = 1024; // Arbitrary.
28 // Function name or equivalent from PC location.
29 constexpr const char *kFormatFunction = "{{{pc:%p}}}";
30 constexpr uptr kFormatFunctionMax = 64; // More than big enough for 64-bit hex.
32 // Global variable name or equivalent from data memory address.
33 constexpr const char *kFormatData = "{{{data:%p}}}";
35 // One frame in a backtrace (printed on a line by itself).
36 constexpr const char *kFormatFrame = " [%u] IP: %p";
38 } // namespace __sanitizer
40 #endif // SANITIZER_SYMBOLIZER_RTEMS_H