1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[llvm-objdump] Add -x --all-headers options

Reviewers: paulsemel, echristo

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D48622

llvm-svn: 335785
This commit is contained in:
Fangrui Song 2018-06-27 20:45:11 +00:00
parent 1f0e8c7e25
commit ca4ba5cdc7
2 changed files with 10 additions and 0 deletions

View File

@ -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 @@ int main(int argc, char **argv) {
if (InputFilenames.size() == 0)
InputFilenames.push_back("a.out");
if (AllHeaders)
PrivateHeaders = Relocations = SectionHeaders = SymbolTable = true;
if (DisassembleAll || PrintSource || PrintLines)
Disassemble = true;
if (!Disassemble

View File

@ -32,6 +32,7 @@ extern cl::opt<std::string> ArchName;
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;