Make `objdump --help' a bit more GNUish
Mark Kettenis
kettenis@wins.uva.nl
Tue Jul 11 07:45:00 GMT 2000
More information about the Binutils mailing list
Tue Jul 11 07:45:00 GMT 2000
- Previous message (by thread): objcopy/strip problem on MIPS (2.10)
- Next message (by thread): Make `objdump --help' a bit more GNUish
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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); }
- Previous message (by thread): objcopy/strip problem on MIPS (2.10)
- Next message (by thread): Make `objdump --help' a bit more GNUish
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list