diff options
author | Nick Clifton <nickc@redhat.com> | 2019-08-28 11:39:19 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2019-08-28 11:39:19 +0100 |
commit | a1c110a3fe02f5cb8de18137f6615005288e849e (patch) | |
tree | 7a2209dfa1f841214890f58efffd960bd2ce9dee /binutils/doc | |
parent | 72dd1784ef6c5157af03c50975aee603e9b6078e (diff) | |
download | gdb-a1c110a3fe02f5cb8de18137f6615005288e849e.zip gdb-a1c110a3fe02f5cb8de18137f6615005288e849e.tar.gz gdb-a1c110a3fe02f5cb8de18137f6615005288e849e.tar.bz2 |
Add a --source-comment=<text> option to objdump which provides a prefix to dipslayed source code lines.
PR 24931
* objdump.c (source_comment): New static variable.
(option_values): Add OPTION_SOURCE_COMMENT.
(long_opions): Add --source-comment.
(print_line): If source comment is set, use it as a prefix to the
source code line.
(main): Handle OPTION_SOURCE_COMMENT.
* doc/binutils.texi: Document the new option.
* NEWS: Mention the new feature.
* testsuite/binutils-all/objdump.exp (test_objdump_S): Add tests
of the -S and --source-comment options.
Diffstat (limited to 'binutils/doc')
-rw-r--r-- | binutils/doc/binutils.texi | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 25b2202..f6cdbdb 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -2104,6 +2104,7 @@ objdump [@option{-a}|@option{--archive-headers}] [@option{-j} @var{section}|@option{--section=}@var{section}] [@option{-l}|@option{--line-numbers}] [@option{-S}|@option{--source}] + [@option{--source-comment}[=@var{text}]] [@option{-m} @var{machine}|@option{--architecture=}@var{machine}] [@option{-M} @var{options}|@option{--disassembler-options=}@var{options}] [@option{-p}|@option{--private-headers}] @@ -2613,6 +2614,15 @@ non-empty sections are displayed. Display source code intermixed with disassembly, if possible. Implies @option{-d}. +@item --source-comment[=@var{txt}] +@cindex source disassembly +@cindex disassembly, with source +Like the @option{-S} option, but all source code lines are displayed +with a prefix of @var{txt}. Typically @var{txt} will be a comment +string which can be used to distinguish the assembler code from the +source code. If @var{txt} is not provided then a default string of +@var{``# ``} (hash followed by a space), will be used. + @item --prefix=@var{prefix} @cindex Add prefix to absolute paths Specify @var{prefix} to add to the absolute paths when used with |