[PATCH] D48622: [llvm-objdump] Add -x --all-headers options
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 26 23:58:24 PDT 2018
MaskRay created this revision.
MaskRay added a reviewer: paulsemel.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D48622
Files:
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-objdump/llvm-objdump.h
Index: tools/llvm-objdump/llvm-objdump.h
===================================================================
--- tools/llvm-objdump/llvm-objdump.h
+++ tools/llvm-objdump/llvm-objdump.h
@@ -32,6 +32,7 @@
extern cl::opt<std::string> MCPU;
extern cl::list<std::string> MAttrs;
extern cl::list<std::string> FilterSections;
+extern cl::opt<bool> AllHeaders;
extern cl::opt<bool> Disassemble;
extern cl::opt<bool> DisassembleAll;
extern cl::opt<bool> NoShowRawInsn;
Index: tools/llvm-objdump/llvm-objdump.cpp
===================================================================
--- tools/llvm-objdump/llvm-objdump.cpp
+++ tools/llvm-objdump/llvm-objdump.cpp
@@ -67,6 +67,12 @@
using namespace llvm;
using namespace object;
+cl::opt<bool>
+ llvm::AllHeaders("all-headers",
+ cl::desc("Display all available header information"));
+static cl::alias AllHeadersShort("x", cl::desc("Alias for --all-headers"),
+ cl::aliasopt(AllHeaders));
+
static cl::list<std::string>
InputFilenames(cl::Positional, cl::desc("<input object files>"),cl::ZeroOrMore);
@@ -2234,6 +2240,9 @@
if (InputFilenames.size() == 0)
InputFilenames.push_back("a.out");
+ if (AllHeaders)
+ PrivateHeaders = Relocations = SectionHeaders = SymbolTable = true;
+
if (DisassembleAll || PrintSource || PrintLines)
Disassemble = true;
if (!Disassemble
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48622.153008.patch
Type: text/x-patch
Size: 1398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180627/906bcf8a/attachment.bin>
More information about the llvm-commits
mailing list