From 8b53311e1054be6e53e1ccef58c3402b066b6f53 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 23 Jan 2002 16:12:56 +0000 Subject: Tidy up formatting of --help output. --- binutils/addr2line.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'binutils/addr2line.c') diff --git a/binutils/addr2line.c b/binutils/addr2line.c index 171c972..a9ceb91 100644 --- a/binutils/addr2line.c +++ b/binutils/addr2line.c @@ -1,5 +1,5 @@ /* addr2line.c -- convert addresses to line number and function name - Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Ulrich Lauther This file is part of GNU Binutils. @@ -70,11 +70,19 @@ usage (stream, status) FILE *stream; int status; { - fprintf (stream, _("\ -Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n\ - [-e executable] [--exe=executable] [--demangle[=style]]\n\ - [--basenames] [--functions] [addr addr ...]\n"), - program_name); + fprintf (stream, _("Usage: %s [option(s)] [addr(s)]\n"), program_name); + fprintf (stream, _(" Convert addresses into line number/file name pairs.\n")); + fprintf (stream, _(" If no addresses are specified on the command line, they will be read from stdin\n")); + fprintf (stream, _(" The options are:\n\ + -b --target= Set the binary file format\n\ + -e --exe= Set the input file name (default is a.out)\n\ + -s --basenames Strip directory names\n\ + -f --functions Show function names\n\ + -C --demangle[=style] Demangle function names\n\ + -h --help Display this information\n\ + -v --version Display the program's version\n\ +\n")); + list_supported_targets (program_name, stream); if (status == 0) fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO); @@ -291,13 +299,13 @@ main (argc, argv) filename = NULL; target = NULL; - while ((c = getopt_long (argc, argv, "b:Ce:sfHV", long_options, (int *) 0)) + while ((c = getopt_long (argc, argv, "b:Ce:sfHhVv", long_options, (int *) 0)) != EOF) { switch (c) { case 0: - break; /* we've been given a long option */ + break; /* We've been given a long option. */ case 'b': target = optarg; break; @@ -324,9 +332,11 @@ main (argc, argv) case 'f': with_functions = true; break; + case 'v': case 'V': print_version ("addr2line"); break; + case 'h': case 'H': usage (stdout, 0); break; -- cgit v1.1