llvm/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp

//===-- sanitizer_symbolizer_markup.cpp -----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is shared between various sanitizers' runtime libraries.
//
// This generic support for offline symbolizing is based on the
// Fuchsia port.  We don't do any actual symbolization per se.
// Instead, we emit text containing raw addresses and raw linkage
// symbol names, embedded in Fuchsia's symbolization markup format.
// See the spec at:
// https://llvm.org/docs/SymbolizerMarkupFormat.html
//===----------------------------------------------------------------------===//

#include "sanitizer_symbolizer_markup.h"

#include "sanitizer_common.h"
#include "sanitizer_symbolizer.h"
#include "sanitizer_symbolizer_markup_constants.h"

namespace __sanitizer {

void MarkupStackTracePrinter::RenderData(InternalScopedString *buffer,
                                         const char *format, const DataInfo *DI,
                                         const char *strip_path_prefix) {}

bool MarkupStackTracePrinter::RenderNeedsSymbolization(const char *format) {}

// We don't support the stack_trace_format flag at all.
void MarkupStackTracePrinter::RenderFrame(InternalScopedString *buffer,
                                          const char *format, int frame_no,
                                          uptr address, const AddressInfo *info,
                                          bool vs_style,
                                          const char *strip_path_prefix) {}

bool MarkupSymbolizerTool::SymbolizePC(uptr addr, SymbolizedStack *stack) {}

bool MarkupSymbolizerTool::SymbolizeData(uptr addr, DataInfo *info) {}

const char *MarkupSymbolizerTool::Demangle(const char *name) {}

// Fuchsia's implementation of symbolizer markup doesn't need to emit contextual
// elements at this point.
// Fuchsia's logging infrastructure emits enough information about
// process memory layout that a post-processing filter can do the
// symbolization and pretty-print the markup.
#if !SANITIZER_FUCHSIA

static bool ModulesEq(const LoadedModule &module,
                      const RenderedModule &renderedModule) {}

static bool ModuleHasBeenRendered(
    const LoadedModule &module,
    const InternalMmapVectorNoCtor<RenderedModule> &renderedModules) {}

static void RenderModule(InternalScopedString *buffer,
                         const LoadedModule &module, uptr moduleId) {}

static void RenderMmaps(InternalScopedString *buffer,
                        const LoadedModule &module, uptr moduleId) {}

void MarkupStackTracePrinter::RenderContext(InternalScopedString *buffer) {}
#endif  // !SANITIZER_FUCHSIA

}  // namespace __sanitizer