* Make `objdump --help' a bit more GNUish
@ 2000-07-11 7:45 Mark Kettenis
0 siblings, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2000-07-11 7:45 UTC (permalink / raw)
To: binutils
Here's a patch that makes `objdump --help' a bit more consistent with
the rest of the GNU world, most notably with Jim Meyerings packages
and packages that use the argp functions form the GNU C Library, which
I regard as being the model to follow in these cases.
The changes should be pretty obvious from the patch. I added a line
describing the program's purpose and added a newline before the option
list. I also removed the printing of the program name in front of the
list of supported targets, since I think it looks nicer.
If people agree with these changes, I'm willing to do similar things
for the other programs in the binutils distribution.
Mark
PS Being a GDB developer, I've got write access to the repository. I
simple "approved" would be enough for this to get in :-).
2000-07-11 Mark Kettenis <kettenis@gnu.org>
* objdump.c (usage): Make output of `objdump --help' more
consistent with the rest of the GNU world. Add a line describing
the purpose of the program. Omit printing the program name when
listing the supported targets.
Index: objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.28
diff -u -p -r1.28 objdump.c
--- objdump.c 2000/06/24 19:53:12 1.28
+++ objdump.c 2000/07/11 14:21:24
@@ -220,55 +220,56 @@ usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, _("Usage: %s <switches> file(s)\n"), program_name);
- fprintf (stream, _(" At least one of the following switches must be given:\n"));
+ fprintf (stream, _("Usage: %s OPTION... FILE...\n"), program_name);
+ fprintf (stream, _("Display information from object FILE.\n"));
+ fprintf (stream, _("\n At least one of the following switches must be given:\n"));
fprintf (stream, _("\
- -a --archive-headers Display archive header information\n\
- -f --file-headers Display the contents of the overall file header\n\
- -p --private-headers Display object format specific file header contents\n\
- -h --[section-]headers Display the contents of the section headers\n\
- -x --all-headers Display the contents of all headers\n\
- -d --disassemble Display assembler contents of executable sections\n\
- -D --disassemble-all Display assembler contents of all sections\n\
- -S --source Intermix source code with disassembly\n\
- -s --full-contents Display the full contents of all sections requested\n\
- -g --debugging Display debug information in object file\n\
- -G --stabs Display (in raw form) any STABS info in the file\n\
- -t --syms Display the contents of the symbol table(s)\n\
- -T --dynamic-syms Display the contents of the dynamic symbol table\n\
- -r --reloc Display the relocation entries in the file\n\
- -R --dynamic-reloc Display the dynamic relocation entries in the file\n\
- -V --version Display this program's version number\n\
- -i --info List object formats and architectures supported\n\
- -H --help Display this information\n\
+ -a, --archive-headers Display archive header information\n\
+ -f, --file-headers Display the contents of the overall file header\n\
+ -p, --private-headers Display object format specific file header contents\n\
+ -h, --[section-]headers Display the contents of the section headers\n\
+ -x, --all-headers Display the contents of all headers\n\
+ -d, --disassemble Display assembler contents of executable sections\n\
+ -D, --disassemble-all Display assembler contents of all sections\n\
+ -S, --source Intermix source code with disassembly\n\
+ -s, --full-contents Display the full contents of all sections requested\n\
+ -g, --debugging Display debug information in object file\n\
+ -G, --stabs Display (in raw form) any STABS info in the file\n\
+ -t, --syms Display the contents of the symbol table(s)\n\
+ -T, --dynamic-syms Display the contents of the dynamic symbol table\n\
+ -r, --reloc Display the relocation entries in the file\n\
+ -R, --dynamic-reloc Display the dynamic relocation entries in the file\n\
+ -V, --version Display this program's version number\n\
+ -i, --info List object formats and architectures supported\n\
+ -H, --help Display this information\n\
"));
if (status != 2)
{
fprintf (stream, _("\n The following switches are optional:\n"));
fprintf (stream, _("\
- -b --target <bfdname> Specify the target object format as <bfdname>\n\
- -m --architecture <machine> Specify the target architecture as <machine>\n\
- -j --section <name> Only display information for section <name>\n\
- -M --disassembler-options <o> Pass text <o> on to the disassembler\n\
+ -b, --target=BFDNAME Specify the target object format as BFDNAME\n\
+ -m, --architecture=MACHINE Specify the target architecture as MACHINE\n\
+ -j, --section=NAME Only display information for section NAME\n\
+ -M, --disassembler-options=OPT Pass text OPT on to the disassembler\n\
-EB --endian=big Assume big endian format when disassembling\n\
-EL --endian=little Assume little endian format when disassembling\n\
--file-start-context Include context from start of file (with -S)\n\
- -l --line-numbers Include line numbers and filenames in output\n\
- -C --demangle Decode mangled/processed symbol names\n\
- -w --wide Format output for more than 80 columns\n\
- -z --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n\
- --start-address <addr> Only process data whoes address is >= <addr>\n\
- --stop-address <addr> Only process data whoes address is <= <addr>\n\
+ -l, --line-numbers Include line numbers and filenames in output\n\
+ -C, --demangle Decode mangled/processed symbol names\n\
+ -w, --wide Format output for more than 80 columns\n\
+ -z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n\
+ --start-address=ADDR Only process data whoes address is >= ADDR\n\
+ --stop-address=ADDR Only process data whoes address is <= ADDR\n\
--prefix-addresses Print complete address alongside disassembly\n\
--[no-]show-raw-insn Display hex alongside symbolic disassembly\n\
- --adjust-vma <offset> Add <offset> to all displayed section addresses\n\
+ --adjust-vma=OFFSET Add OFFSET to all displayed section addresses\n\
\n"));
- list_supported_targets (program_name, stream);
+ list_supported_targets (NULL, stream);
disassembler_usage (stream);
}
if (status == 0)
- fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
+ fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO);
exit (status);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Make `objdump --help' a bit more GNUish
2000-07-11 13:24 Nick Clifton
@ 2000-07-12 12:53 ` Mark Kettenis
0 siblings, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2000-07-12 12:53 UTC (permalink / raw)
To: nickc; +Cc: binutils
Date: Tue, 11 Jul 2000 13:24:03 -0700
From: Nick Clifton <nickc@cygnus.com>
Hi Mark,
: 2000-07-11 Mark Kettenis <kettenis@gnu.org>
:
: * objdump.c (usage): Make output of `objdump --help' more
: consistent with the rest of the GNU world. Add a line describing
: the purpose of the program. Omit printing the program name when
: listing the supported targets.
This patch is basically OK, except for the removal of the program name
when listing the supported targets. Some tools (eg libtool) depend
upon being able to parse the target list in the output of --help.
(This may not be true for binutils, but it certainly is true for ld.
Take a look at the comment at the end of help() in ld/lexsup.c). So
for consistency's sake, I would suggest that we leave the program name
in.
Checked in now (sans removal of the program name from the list of
targets).
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Make `objdump --help' a bit more GNUish
@ 2000-07-11 13:24 Nick Clifton
2000-07-12 12:53 ` Mark Kettenis
0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2000-07-11 13:24 UTC (permalink / raw)
To: kettenis; +Cc: binutils
Hi Mark,
: 2000-07-11 Mark Kettenis <kettenis@gnu.org>
:
: * objdump.c (usage): Make output of `objdump --help' more
: consistent with the rest of the GNU world. Add a line describing
: the purpose of the program. Omit printing the program name when
: listing the supported targets.
This patch is basically OK, except for the removal of the program name
when listing the supported targets. Some tools (eg libtool) depend
upon being able to parse the target list in the output of --help.
(This may not be true for binutils, but it certainly is true for ld.
Take a look at the comment at the end of help() in ld/lexsup.c). So
for consistency's sake, I would suggest that we leave the program name
in.
: PS Being a GDB developer, I've got write access to the repository.
: I simple "approved" would be enough for this to get in :-).
Apart from the one item mentioned above, this patch is approved.
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-07-12 12:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-11 7:45 Make `objdump --help' a bit more GNUish Mark Kettenis
2000-07-11 13:24 Nick Clifton
2000-07-12 12:53 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).