objdump command to disassemble raw MIPS binary

Nick Clifton nickc@redhat.com
Mon Aug 6 09:33:00 GMT 2018


Hi Alex,

> What additional switches can be used to get disassembled output with more detalization?
> (for example, more easily to determine memory location of a specific local variable)

Determining the location of a local variable is actually quite hard as it could
live in several different locations (on the stack, in a register, somewhere else
in memory).

You could use the disassembler to display the instructions involved and then work 
out for yourself where the variable lives.  Alternatively you could look at the
dwarf debug information which probably includes details on the variable (although
it can be rather hard to find).  Or you could use gdb, which should be able to
show you the contents, and probably the location, of any variable you choose.

You might also find the disassembler's  --source option helpful.  This displays
the source code intermixed with the disassembly, which can help you narrow down
where a variable is actually used.

Cheers
  Nick



More information about the Binutils mailing list