Path: blob/main/contrib/llvm-project/llvm/tools/llvm-readobj/Win64EHDumper.h
35230 views
//===- Win64EHDumper.h - Win64 EH Printing ----------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_TOOLS_LLVM_READOBJ_WIN64EHDUMPER_H9#define LLVM_TOOLS_LLVM_READOBJ_WIN64EHDUMPER_H1011#include "llvm/Support/ScopedPrinter.h"12#include "llvm/Support/Win64EH.h"1314namespace llvm {15namespace object {16class COFFObjectFile;17class SymbolRef;18struct coff_section;19}2021namespace Win64EH {22class Dumper {23ScopedPrinter &SW;24raw_ostream &OS;2526public:27typedef std::error_code (*SymbolResolver)(const object::coff_section *,28uint64_t, object::SymbolRef &,29void *);3031struct Context {32const object::COFFObjectFile &COFF;33SymbolResolver ResolveSymbol;34void *UserData;3536Context(const object::COFFObjectFile &COFF, SymbolResolver Resolver,37void *UserData)38: COFF(COFF), ResolveSymbol(Resolver), UserData(UserData) {}39};4041private:42void printRuntimeFunctionEntry(const Context &Ctx,43const object::coff_section *Section,44uint64_t SectionOffset,45const RuntimeFunction &RF);46void printUnwindCode(const UnwindInfo& UI, ArrayRef<UnwindCode> UC);47void printUnwindInfo(const Context &Ctx, const object::coff_section *Section,48off_t Offset, const UnwindInfo &UI);49void printRuntimeFunction(const Context &Ctx,50const object::coff_section *Section,51uint64_t SectionOffset, const RuntimeFunction &RF);5253public:54Dumper(ScopedPrinter &SW) : SW(SW), OS(SW.getOStream()) {}5556void printData(const Context &Ctx);57};58}59}6061#endif626364