Add the -section option to llvm-objdump used with -macho that takes the argument
[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> Disassemble;
31 extern cl::opt<bool> NoShowRawInsn;
32 extern cl::opt<bool> PrivateHeaders;
33 extern cl::opt<bool> ExportsTrie;
34 extern cl::opt<bool> Rebase;
35 extern cl::opt<bool> Bind;
36 extern cl::opt<bool> LazyBind;
37 extern cl::opt<bool> WeakBind;
38 extern cl::opt<bool> UniversalHeaders;
39 extern cl::opt<bool> ArchiveHeaders;
40 extern cl::opt<bool> IndirectSymbols;
41 extern cl::opt<bool> DataInCode;
42 extern cl::opt<bool> LinkOptHints;
43 extern cl::opt<bool> Relocations;
44 extern cl::opt<bool> SectionHeaders;
45 extern cl::opt<bool> SectionContents;
46 extern cl::opt<bool> SymbolTable;
47 extern cl::opt<bool> UnwindInfo;
48
49 // Various helper functions.
50 bool error(std::error_code ec);
51 bool RelocAddressLess(object::RelocationRef a, object::RelocationRef b);
52 void DumpBytes(StringRef bytes);
53 void ParseInputMachO(StringRef Filename);
54 void printCOFFUnwindInfo(const object::COFFObjectFile* o);
55 void printMachOUnwindInfo(const object::MachOObjectFile* o);
56 void printMachOExportsTrie(const object::MachOObjectFile* o);
57 void printMachORebaseTable(const object::MachOObjectFile* o);
58 void printMachOBindTable(const object::MachOObjectFile* o);
59 void printMachOLazyBindTable(const object::MachOObjectFile* o);
60 void printMachOWeakBindTable(const object::MachOObjectFile* o);
61 void printELFFileHeader(const object::ObjectFile *o);
62 void printCOFFFileHeader(const object::ObjectFile *o);
63 void printMachOFileHeader(const object::ObjectFile *o);
64 void printExportsTrie(const object::ObjectFile *o);
65 void printRebaseTable(const object::ObjectFile *o);
66 void printBindTable(const object::ObjectFile *o);
67 void printLazyBindTable(const object::ObjectFile *o);
68 void printWeakBindTable(const object::ObjectFile *o);
69 void PrintRelocations(const object::ObjectFile *o);
70 void PrintSectionHeaders(const object::ObjectFile *o);
71 void PrintSectionContents(const object::ObjectFile *o);
72 void PrintSymbolTable(const object::ObjectFile *o);
73
74 } // end namespace llvm
75
76 #endif