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"
31 typedef std::function<error_code(const object::coff_section *, uint64_t,
32 object::SymbolRef &)> SymbolResolver;
35 const object::COFFObjectFile &COFF;
36 SymbolResolver ResolveSymbol;
38 Context(const object::COFFObjectFile &COFF, SymbolResolver Resolver)
39 : COFF(COFF), ResolveSymbol(Resolver) {}
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(StreamWriter &SW) : SW(SW), OS(SW.getOStream()) {}
57 void printData(const Context &Ctx);