Add a -raw option to the -section mode of llvm-objdump.
[oota-llvm.git] / tools / llvm-objdump / llvm-objdump.h
1 //===-- llvm-objdump.h ----------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H
11 #define LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H
12
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/Support/CommandLine.h"
15 #include "llvm/Support/DataTypes.h"
16
17 namespace llvm {
18 namespace object {
19   class COFFObjectFile;
20   class MachOObjectFile;
21   class ObjectFile;
22   class RelocationRef;
23 }
24
25 extern cl::opt<std::string> TripleName;
26 extern cl::opt<std::string> ArchName;
27 extern cl::opt<std::string> MCPU;
28 extern cl::list<std::string> MAttrs;
29 extern cl::list<std::string> DumpSections;
30 extern cl::opt<bool> Raw;
31 extern cl::opt<bool> Disassemble;
32 extern cl::opt<bool> NoShowRawInsn;
33 extern cl::opt<bool> PrivateHeaders;
34 extern cl::opt<bool> ExportsTrie;
35 extern cl::opt<bool> Rebase;
36 extern cl::opt<bool> Bind;
37 extern cl::opt<bool> LazyBind;
38 extern cl::opt<bool> WeakBind;
39 extern cl::opt<bool> UniversalHeaders;
40 extern cl::opt<bool> ArchiveHeaders;
41 extern cl::opt<bool> IndirectSymbols;
42 extern cl::opt<bool> DataInCode;
43 extern cl::opt<bool> LinkOptHints;
44 extern cl::opt<bool> InfoPlist;
45 extern cl::opt<bool> DylibsUsed;
46 extern cl::opt<bool> DylibId;
47 extern cl::opt<std::string> DisSymName;
48 extern cl::opt<bool> NonVerbose;
49 extern cl::opt<bool> Relocations;
50 extern cl::opt<bool> SectionHeaders;
51 extern cl::opt<bool> SectionContents;
52 extern cl::opt<bool> SymbolTable;
53 extern cl::opt<bool> UnwindInfo;
54
55 // Various helper functions.
56 bool error(std::error_code ec);
57 bool RelocAddressLess(object::RelocationRef a, object::RelocationRef b);
58 void DumpBytes(ArrayRef<uint8_t> bytes);
59 void ParseInputMachO(StringRef Filename);
60 void printCOFFUnwindInfo(const object::COFFObjectFile* o);
61 void printMachOUnwindInfo(const object::MachOObjectFile* o);
62 void printMachOExportsTrie(const object::MachOObjectFile* o);
63 void printMachORebaseTable(const object::MachOObjectFile* o);
64 void printMachOBindTable(const object::MachOObjectFile* o);
65 void printMachOLazyBindTable(const object::MachOObjectFile* o);
66 void printMachOWeakBindTable(const object::MachOObjectFile* o);
67 void printELFFileHeader(const object::ObjectFile *o);
68 void printCOFFFileHeader(const object::ObjectFile *o);
69 void printMachOFileHeader(const object::ObjectFile *o);
70 void printExportsTrie(const object::ObjectFile *o);
71 void printRebaseTable(const object::ObjectFile *o);
72 void printBindTable(const object::ObjectFile *o);
73 void printLazyBindTable(const object::ObjectFile *o);
74 void printWeakBindTable(const object::ObjectFile *o);
75 void PrintRelocations(const object::ObjectFile *o);
76 void PrintSectionHeaders(const object::ObjectFile *o);
77 void PrintSectionContents(const object::ObjectFile *o);
78 void PrintSymbolTable(const object::ObjectFile *o);
79
80 } // end namespace llvm
81
82 #endif