1 //===- Win64EHDumper.h - Win64 EH Printing ----------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TOOLS_LLVM_READOBJ_WIN64EHDUMPER_H
10 #define LLVM_TOOLS_LLVM_READOBJ_WIN64EHDUMPER_H
12 #include "llvm/Support/ScopedPrinter.h"
13 #include "llvm/Support/Win64EH.h"
28 typedef std::error_code (*SymbolResolver)(const object::coff_section *,
29 uint64_t, object::SymbolRef &,
33 const object::COFFObjectFile &COFF;
34 SymbolResolver ResolveSymbol;
37 Context(const object::COFFObjectFile &COFF, SymbolResolver Resolver,
39 : COFF(COFF), ResolveSymbol(Resolver), UserData(UserData) {}
43 void printRuntimeFunctionEntry(const Context &Ctx,
44 const object::coff_section *Section,
45 uint64_t SectionOffset,
46 const RuntimeFunction &RF);
47 void printUnwindCode(const UnwindInfo& UI, ArrayRef<UnwindCode> UC);
48 void printUnwindInfo(const Context &Ctx, const object::coff_section *Section,
49 off_t Offset, const UnwindInfo &UI);
50 void printRuntimeFunction(const Context &Ctx,
51 const object::coff_section *Section,
52 uint64_t SectionOffset, const RuntimeFunction &RF);
55 Dumper(ScopedPrinter &SW) : SW(SW), OS(SW.getOStream()) {}
57 void printData(const Context &Ctx);