1 //===- Win64EHDumper.h - Win64 EH Printing ----------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_TOOLS_READOBJ_WIN64EHPRINTER_H
11 #define LLVM_TOOLS_READOBJ_WIN64EHPRINTER_H
13 #include "StreamWriter.h"
14 #include "llvm/Support/Win64EH.h"
29 typedef std::error_code (*SymbolResolver)(const object::coff_section *,
30 uint64_t, object::SymbolRef &,
34 const object::COFFObjectFile &COFF;
35 SymbolResolver ResolveSymbol;
38 Context(const object::COFFObjectFile &COFF, SymbolResolver Resolver,
40 : COFF(COFF), ResolveSymbol(Resolver), UserData(UserData) {}
44 void printRuntimeFunctionEntry(const Context &Ctx,
45 const object::coff_section *Section,
46 uint64_t SectionOffset,
47 const RuntimeFunction &RF);
48 void printUnwindCode(const UnwindInfo& UI, ArrayRef<UnwindCode> UC);
49 void printUnwindInfo(const Context &Ctx, const object::coff_section *Section,
50 off_t Offset, const UnwindInfo &UI);
51 void printRuntimeFunction(const Context &Ctx,
52 const object::coff_section *Section,
53 uint64_t SectionOffset, const RuntimeFunction &RF);
56 Dumper(StreamWriter &SW) : SW(SW), OS(SW.getOStream()) {}
58 void printData(const Context &Ctx);