This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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.


2006-10-16 Bob Wilson <>

* 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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]