diff options
author | Masatake Yamato <yamato@redhat.com> | 2018-11-07 18:07:36 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-11-07 18:07:36 +0000 |
commit | d3def5d73eb9d8295ca7b11d130b17a815151951 (patch) | |
tree | 037c3d7c37564e655599bd565b23d22822ed3992 /binutils/doc | |
parent | 0661ae2e5324719f7850e81fc1da9f6505361ae4 (diff) | |
download | gdb-d3def5d73eb9d8295ca7b11d130b17a815151951.zip gdb-d3def5d73eb9d8295ca7b11d130b17a815151951.tar.gz gdb-d3def5d73eb9d8295ca7b11d130b17a815151951.tar.bz2 |
Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol.
* objdump.c (long_options): Have the --disassemble option take an
optional argument.
(usage): Add description for the `symbol' argument to the
--disassemble option.
(disasm_sym): New file private variable.
(struct objdump_disasm_info): New field `symbol'.
(disassemble_section): Introduce `do_print' local variable
to control whether objdump displays the result of disassembling
for a symbol or not.
(main): Set `symbol' file private variable if the option argument
for the --disassemble option is given.
* doc/binutils.texi (objdump): Add description for the option
argument.
* NEWS: Mention the new feature.
* testsuite/binutils-all/objdump.exp: Add tests of the -d and
--disassemble=<symbol> options.
* testsuite/binutils-all/bintest.s: Add more symbols and code.
* testsuite/binutils-all/readelf.s: Update expected output.
* testsuite/binutils-all/readelf.ss-64: Likewise.
* testsuite/binutils-all/readelf.ss-mips: Likewise.
* testsuite/binutils-all/readelf.ss-tmips: Likewise.
Diffstat (limited to 'binutils/doc')
-rw-r--r-- | binutils/doc/binutils.texi | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 6cfda45..9954adf 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -2063,7 +2063,7 @@ ld(1), objdump(1), and the Info entries for @file{binutils}. objdump [@option{-a}|@option{--archive-headers}] [@option{-b} @var{bfdname}|@option{--target=@var{bfdname}}] [@option{-C}|@option{--demangle}[=@var{style}] ] - [@option{-d}|@option{--disassemble}] + [@option{-d}|@option{--disassemble}[=@var{symbol}]] [@option{-D}|@option{--disassemble-all}] [@option{-z}|@option{--disassemble-zeroes}] [@option{-EB}|@option{-EL}|@option{--endian=}@{big | little @}] @@ -2189,11 +2189,15 @@ with ctags tool. @item -d @itemx --disassemble +@itemx --disassemble=@var{symbol} @cindex disassembling object code @cindex machine instructions -Display the assembler mnemonics for the machine instructions from -@var{objfile}. This option only disassembles those sections which are -expected to contain instructions. +Display the assembler mnemonics for the machine instructions from the +input file. This option only disassembles those sections which are +expected to contain instructions. If the optional @var{symbol} +argument is given, then display the assembler mnemonics only from +@var{symbol} up to next symbol. If there are no matches for +@var{symbol} then nothing will be displayed. @item -D @itemx --disassemble-all |