* objdump.c (prefix_addresses): New static variable.

(long_options): Add "prefix-addresses".
	(compare_symbols): Sort BSF_FUNCTION symbols before other
	symbols.
	(find_symbol_for_address): New static function, broken out of
	objdump_print_address.
	(objdump_print_addr_with_sym): New static function, broken out of
	objdump_print_address.
	(objdump_print_address): Call new functions.
	(disassemble_bytes): New static function, broken out of
	disassemble_data.  Change disassembly format, unless
	prefix_addresses is set.
	(disassemble_data): Call disassemble_bytes.  Unless
	prefix_addresses is set, disassemble in chunks headed by a
	symbol.
	* binutils.texi, objdump.1: Document --prefix-addresses.
This commit is contained in:
Ian Lance Taylor 1996-10-24 21:21:17 +00:00
parent f009978996
commit 4cb99ff2a1
2 changed files with 18 additions and 4 deletions

View File

@ -1040,7 +1040,8 @@ objdump [ -a | --archive-headers ]
[ -s | --full-contents ] [ --stabs ]
[ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ]
[ -w | --wide ] [ --start-address=@var{address} ]
[ --stop-address=@var{address} ] [ --show-raw-insn ]
[ --stop-address=@var{address} ]
[ --prefix-addresses] [ --show-raw-insn ]
[ --version ] [ --help ]
@var{objfile}@dots{}
@end smallexample
@ -1165,6 +1166,10 @@ can be useful when disasembling object files which do not describe
architecture information, such as S-records. You can list the available
architectures with the @samp{-i} option.
@item --prefix-addresses
When disassembling, print the complete address on each line. This is
the older disassembly format.
@item -r
@itemx --reloc
@cindex relocation entries, in object file
@ -1194,7 +1199,8 @@ Display source code intermixed with disassembly, if possible. Implies
@item --show-raw-insn
When disassembling instructions, print the instruction in hex as well as
in symbolic form. Not all targets handle this correctly yet.
in symbolic form. This is the default except when
@code{--prefix-addresses} is used.
@item --stabs
@cindex stab

View File

@ -42,6 +42,7 @@ objdump \- display information from object files.
.RB " | " "\-\-architecture="\c
.I machine\c
\&\|]
.RB "[\|" \-\-prefix\-addresses "\|]"
.RB "[\|" \-r | \-\-reloc "\|]"
.RB "[\|" \-R | \-\-dynamic\-reloc "\|]"
.RB "[\|" \-s | \-\-full\-contents "\|]"
@ -224,6 +225,11 @@ can be useful when disasembling object files which do not describe
architecture information, such as S-records. You can list the available
architectures with the \fB\-i\fP option.
.TP
.B \-\-prefix\-addresses
When disassembling, print the complete address on each line. This is
the older disassembly format.
.TP
.B \-r
.TP
@ -254,9 +260,11 @@ Display source code intermixed with disassembly, if possible. Implies
\fB-d\fP.
.TP
.B \-\-show-raw-insn
.B \-\-show\-raw\-insn
When disassembling instructions, print the instruction in hex as well as
in symbolic form. Not all targets handle this correctly yet.
in symbolic form. This is the default except when
.B \-\-prefix\-addresses
is used.
.TP
.B \-\-stabs