X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fllvm-objdump%2Fllvm-objdump.h;h=ef1509f933a0029a5d73d0bdca6297a273202a51;hb=5ebdee51db184f910b6f8ecac0c7d674b7ae8f30;hp=9f5a8c3db973892239cbd56b879e2130618903e5;hpb=eef7b6219ebe5d0ded0be4adb3003055fa8a63c4;p=oota-llvm.git diff --git a/tools/llvm-objdump/llvm-objdump.h b/tools/llvm-objdump/llvm-objdump.h index 9f5a8c3db97..ef1509f933a 100644 --- a/tools/llvm-objdump/llvm-objdump.h +++ b/tools/llvm-objdump/llvm-objdump.h @@ -7,49 +7,43 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_OBJDUMP_H -#define LLVM_OBJDUMP_H +#ifndef LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H +#define LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H #include "llvm/ADT/StringRef.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/DataTypes.h" -#include "llvm/Support/MemoryObject.h" namespace llvm { - namespace object { class COFFObjectFile; + class MachOObjectFile; + class ObjectFile; class RelocationRef; } -class error_code; extern cl::opt TripleName; extern cl::opt ArchName; +extern cl::opt MCPU; +extern cl::list MAttrs; +extern cl::opt NoShowRawInsn; // Various helper functions. -bool error(error_code ec); +bool error(std::error_code ec); bool RelocAddressLess(object::RelocationRef a, object::RelocationRef b); void DumpBytes(StringRef bytes); void DisassembleInputMachO(StringRef Filename); void printCOFFUnwindInfo(const object::COFFObjectFile* o); - -class StringRefMemoryObject : public MemoryObject { - virtual void anchor(); - StringRef Bytes; -public: - StringRefMemoryObject(StringRef bytes) : Bytes(bytes) {} - - uint64_t getBase() const { return 0; } - uint64_t getExtent() const { return Bytes.size(); } - - int readByte(uint64_t Addr, uint8_t *Byte) const { - if (Addr >= getExtent()) - return -1; - *Byte = Bytes[Addr]; - return 0; - } -}; - -} +void printMachOUnwindInfo(const object::MachOObjectFile* o); +void printMachOExportsTrie(const object::MachOObjectFile* o); +void printMachORebaseTable(const object::MachOObjectFile* o); +void printMachOBindTable(const object::MachOObjectFile* o); +void printMachOLazyBindTable(const object::MachOObjectFile* o); +void printMachOWeakBindTable(const object::MachOObjectFile* o); +void printELFFileHeader(const object::ObjectFile *o); +void printCOFFFileHeader(const object::ObjectFile *o); +void printMachOFileHeader(const object::ObjectFile *o); + +} // end namespace llvm #endif