]> git.ipfire.org Git - thirdparty/gcc.git/blame - libsanitizer/sanitizer_common/sanitizer_symbolizer_fuchsia.h
Libsanitizer merge from trunk r368656.
[thirdparty/gcc.git] / libsanitizer / sanitizer_common / sanitizer_symbolizer_fuchsia.h
CommitLineData
eac97531
ML
1//===-- sanitizer_symbolizer_fuchsia.h -----------------------------------===//
2//
b667dd70
ML
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
eac97531
ML
6//
7//===----------------------------------------------------------------------===//
8//
9// This file is shared between various sanitizers' runtime libraries.
10//
11// Define Fuchsia's string formats and limits for the markup symbolizer.
12//===----------------------------------------------------------------------===//
13#ifndef SANITIZER_SYMBOLIZER_FUCHSIA_H
14#define SANITIZER_SYMBOLIZER_FUCHSIA_H
15
16#include "sanitizer_internal_defs.h"
17
18namespace __sanitizer {
19
20// See the spec at:
21// https://fuchsia.googlesource.com/zircon/+/master/docs/symbolizer_markup.md
22
23// This is used by UBSan for type names, and by ASan for global variable names.
24constexpr const char *kFormatDemangle = "{{{symbol:%s}}}";
25constexpr uptr kFormatDemangleMax = 1024; // Arbitrary.
26
27// Function name or equivalent from PC location.
28constexpr const char *kFormatFunction = "{{{pc:%p}}}";
29constexpr uptr kFormatFunctionMax = 64; // More than big enough for 64-bit hex.
30
31// Global variable name or equivalent from data memory address.
32constexpr const char *kFormatData = "{{{data:%p}}}";
33
34// One frame in a backtrace (printed on a line by itself).
35constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}";
36
b667dd70
ML
37// Dump trigger element.
38#define FORMAT_DUMPFILE "{{{dumpfile:%s:%s}}}"
39
eac97531
ML
40} // namespace __sanitizer
41
42#endif // SANITIZER_SYMBOLIZER_FUCHSIA_H