[PATCH] D48622: [llvm-objdump] Add -x --all-headers options
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 27 13:50:34 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL335785: [llvm-objdump] Add -x --all-headers options (authored by MaskRay, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D48622
Files:
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
llvm/trunk/tools/llvm-objdump/llvm-objdump.h
Index: llvm/trunk/tools/llvm-objdump/llvm-objdump.h
===================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.h
+++ llvm/trunk/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: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
===================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
+++ llvm/trunk/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.153170.patch
Type: text/x-patch
Size: 1464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180627/d4986b54/attachment.bin>
More information about the llvm-commits
mailing list