mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-26 20:57:15 +00:00
Add the option -no-symbolic-operands to llvm-objdump used with -macho and
-disassemble to not symbolic operands when disassembling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232558 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
de0ccb2104
commit
ba5a585242
@ -7,6 +7,9 @@
|
||||
// RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.obj.macho-i386 | FileCheck %s -check-prefix=i386-OBJ
|
||||
// RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.exe.macho-i386 | FileCheck %s -check-prefix=i386-EXE
|
||||
|
||||
// RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -no-symbolic-operands %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s -check-prefix=NO-SYM-OPS-OBJ
|
||||
// RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -no-symbolic-operands %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s -check-prefix=NO-SYM-OPS-EXE
|
||||
|
||||
OBJ: 0000000000000008 leaq L_.str(%rip), %rax ## literal pool for: "Hello world\n"
|
||||
OBJ: 0000000000000026 callq _printf
|
||||
|
||||
@ -36,3 +39,9 @@ CXX-EXE: 00000001000014cb callq __ZNSt3__116__pad_and_outputIcNS_11char_traitsIc
|
||||
i386-OBJ: 0000002f calll _printf
|
||||
|
||||
i386-EXE: 00001f6f calll 0x1f84 ## symbol stub for: _printf
|
||||
|
||||
NO-SYM-OPS-OBJ: 0000000000000008 leaq (%rip), %rax
|
||||
NO-SYM-OPS-OBJ: 0000000000000026 callq 0x2b
|
||||
|
||||
NO-SYM-OPS-EXE: 0000000100000f38 leaq 0x4f(%rip), %rax
|
||||
NO-SYM-OPS-EXE: 0000000100000f56 callq 0x100000f6c
|
||||
|
@ -66,7 +66,6 @@ static cl::opt<bool> FullLeadingAddr("full-leading-addr",
|
||||
static cl::opt<bool> NoLeadingAddr("no-leading-addr",
|
||||
cl::desc("Print no leading address"));
|
||||
|
||||
|
||||
static cl::opt<bool>
|
||||
PrintImmHex("print-imm-hex",
|
||||
cl::desc("Use hex format for immediate values"));
|
||||
@ -124,6 +123,11 @@ cl::opt<std::string> llvm::DisSymName(
|
||||
"dis-symname",
|
||||
cl::desc("disassemble just this symbol's instructions (requires -macho"));
|
||||
|
||||
static cl::opt<bool> NoSymbolicOperands(
|
||||
"no-symbolic-operands",
|
||||
cl::desc("do not symbolic operands when disassembling (requires -macho)"));
|
||||
|
||||
|
||||
static cl::list<std::string>
|
||||
ArchFlags("arch", cl::desc("architecture(s) from a Mach-O file to dump"),
|
||||
cl::ZeroOrMore);
|
||||
@ -3209,7 +3213,7 @@ static void DisassembleMachO(StringRef Filename, MachOObjectFile *MachOOF,
|
||||
return;
|
||||
}
|
||||
// Set up the block of info used by the Symbolizer call backs.
|
||||
SymbolizerInfo.verbose = true;
|
||||
SymbolizerInfo.verbose = !NoSymbolicOperands;
|
||||
SymbolizerInfo.O = MachOOF;
|
||||
SymbolizerInfo.S = Sections[SectIdx];
|
||||
SymbolizerInfo.AddrMap = &AddrMap;
|
||||
@ -3222,7 +3226,7 @@ static void DisassembleMachO(StringRef Filename, MachOObjectFile *MachOOF,
|
||||
SymbolizerInfo.adrp_addr = 0;
|
||||
SymbolizerInfo.adrp_inst = 0;
|
||||
// Same for the ThumbSymbolizer
|
||||
ThumbSymbolizerInfo.verbose = true;
|
||||
ThumbSymbolizerInfo.verbose = !NoSymbolicOperands;
|
||||
ThumbSymbolizerInfo.O = MachOOF;
|
||||
ThumbSymbolizerInfo.S = Sections[SectIdx];
|
||||
ThumbSymbolizerInfo.AddrMap = &AddrMap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user