Customization of "objdump" command for instruction view

Authored by weidendo on Jul 30 2018, 4:46 PM.

Description

Customization of "objdump" command for instruction view

"objdump" is called to disassemble code from an object file
for showing machine code in the instruction view.
To e.g. support "objdump" from LLVM or on MacOS, or to change
shown x86 instruction format from AT&T to Intel, the template
string for calling "objdump" can be changed by setting
the OBJDUMP_FORMAT environment variable.

If not set, the command format defaults to

"objdump  -C -d --start-address=0x%1 --stop-address=0x%2 %3"

Before execution, the following strings will be replaced:

%1 with hex start address
%2 with hex end address
%3 with name of object file

As the "objdump" command on MacOS (from LLVM) does not support "-C"
to ask for demangling of C++ symbols, OBJDUMP_FORMAT needs to be
set to "objdump -d --start-address=0x%1 --stop-address=0x%2 %3".

Details

Committed
weidendoOct 3 2018, 10:53 PM
Parents
R49:bfc9a64950fe: Fix minor EBN issues
Branches
Unknown
Tags
Unknown