This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] fix gprof's option parsing
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 16 Oct 2006 15:45:45 -0700
- Subject: [PATCH] fix gprof's option parsing
gprof's -C option takes an optional argument, but the getopt option string shows
that it has no argument.
The -n and -N options both have required arguments, but the getopt option string
shows that they have optional arguments. (Try running "gprof -n"!)
This patch fixes both. To test this, I did a i686-pc-linux-gnu build and
manually ran gprof with several variations on these options.
OK?
2006-10-16 Bob Wilson <bob.wilson@acm.org>
* gprof.c (main): Fix option string for -C, -n and -N.
Index: gprof.c
===================================================================
RCS file: /cvs/src/src/gprof/gprof.c,v
retrieving revision 1.26
diff -u -p -r1.26 gprof.c
--- gprof.c 2 May 2006 18:03:02 -0000 1.26
+++ gprof.c 16 Oct 2006 22:16:36 -0000
@@ -200,7 +200,7 @@ main (int argc, char **argv)
expandargv (&argc, &argv);
while ((ch = getopt_long (argc, argv,
- "aA::bBcCd::De:E:f:F:hiI:J::k:lLm:n::N::O:p::P::q::Q::st:Tvw:xyzZ::",
+ "aA::bBcC::d::De:E:f:F:hiI:J::k:lLm:n:N:O:p::P::q::Q::st:Tvw:xyzZ::",
long_options, 0))
!= EOF)
{