brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · a43661e Raw
50 lines · c
1//===-- sanitizer_symbolizer_markup_constants.h2//-----------------------------------===//3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7//8//===----------------------------------------------------------------------===//9//10// This file is shared between various sanitizers' runtime libraries.11//12// Define string formats and limits for the markup symbolizer.13//===----------------------------------------------------------------------===//14#ifndef SANITIZER_SYMBOLIZER_MARKUP_CONSTANTS_H15#define SANITIZER_SYMBOLIZER_MARKUP_CONSTANTS_H16 17#include "sanitizer_internal_defs.h"18 19namespace __sanitizer {20 21// See the spec at:22// https://fuchsia.googlesource.com/zircon/+/master/docs/symbolizer_markup.md23 24// This is used by UBSan for type names, and by ASan for global variable names.25constexpr const char *kFormatDemangle = "{{{symbol:%s}}}";26constexpr uptr kFormatDemangleMax = 1024;  // Arbitrary.27 28// Function name or equivalent from PC location.29constexpr const char *kFormatFunction = "{{{pc:%p}}}";30constexpr uptr kFormatFunctionMax = 64;  // More than big enough for 64-bit hex.31 32// Global variable name or equivalent from data memory address.33constexpr const char *kFormatData = "{{{data:%p}}}";34 35// One frame in a backtrace (printed on a line by itself).36constexpr const char *kFormatFrame = "{{{bt:%d:%p}}}";37 38// Module contextual element.39constexpr const char *kFormatModule = "{{{module:%zu:%s:elf:%s}}}";40 41// mmap for a module segment.42constexpr const char *kFormatMmap = "{{{mmap:%p:0x%zx:load:%d:%s:0x%zx}}}";43 44// Dump trigger element.45#define FORMAT_DUMPFILE "{{{dumpfile:%s:%s}}}"46 47}  // namespace __sanitizer48 49#endif  // SANITIZER_SYMBOLIZER_MARKUP_CONSTANTS_H50