aboutsummaryrefslogtreecommitdiff
path: root/gprof/gprof.c
diff options
context:
space:
mode:
authorDavid MacKenzie <djm@cygnus>1993-06-24 21:44:34 +0000
committerDavid MacKenzie <djm@cygnus>1993-06-24 21:44:34 +0000
commit7ce122a2018d8cd33d299f1fe143b79c09592dcf (patch)
tree016f2f1ca7f9a5fbeef03c1ee27ec24f139b1324 /gprof/gprof.c
parent998ce1e0c72d944a8f72a7155b35ca32910ac3df (diff)
downloadgdb-7ce122a2018d8cd33d299f1fe143b79c09592dcf.zip
gdb-7ce122a2018d8cd33d299f1fe143b79c09592dcf.tar.gz
gdb-7ce122a2018d8cd33d299f1fe143b79c09592dcf.tar.bz2
* gprof.c (main): Get whoami from argv, instead of hardcoding.
Use it in usage message. Split usage message to fit in 80 cols.
Diffstat (limited to 'gprof/gprof.c')
-rw-r--r--gprof/gprof.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gprof/gprof.c b/gprof/gprof.c
index 5264eea..af54a9d 100644
--- a/gprof/gprof.c
+++ b/gprof/gprof.c
@@ -31,7 +31,7 @@ static char sccsid[] = "@(#)gprof.c 5.6 (Berkeley) 6/1/90";
bfd *abfd;
-char *whoami = "gprof";
+char *whoami;
/*
* things which get -E excluded by default.
@@ -48,6 +48,7 @@ main(argc, argv)
char **sp;
nltype **timesortnlp;
+ whoami = argv[0];
--argc;
argv++;
debug = 0;
@@ -112,11 +113,10 @@ main(argc, argv)
zflag = TRUE;
break;
default:
- fprintf (stderr, "usage: gprof [-a] [-b] [-c] [-d[num]] \
-[-E function-name] [-e function-name] \
-[-F function-name] [-f function-name] \
-[-k from to] [-s] [-T] [-z] [image-file] \
-[profile file(s)]\n");
+ fprintf (stderr, "\
+Usage: %s [-a] [-b] [-c] [-d[num]] [-E function-name] [-e function-name]\n\
+ [-F function-name] [-f function-name] [-k from to] [-s] [-T] [-z]\n\
+ [image-file] [profile-file...]\n", whoami);
exit (1);
}
argv++;