Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jan 2009 21:49:42 +0000 (UTC)
From:      "David E. O'Brien" <obrien@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187116 - head/usr.bin/gprof
Message-ID:  <200901122149.n0CLngA5077255@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: obrien
Date: Mon Jan 12 21:49:42 2009
New Revision: 187116
URL: http://svn.freebsd.org/changeset/base/187116

Log:
  If running with "-K" really do not information about symbols from the a.out
  argument.  Before this fix, after searching the currently-running kernel,
  we would still search the a.out argument - completely override the in-kernel
  list, essentially defeating the K flag's purpose.
  
  PR:		47387
  Submitted by:	Ryan Beasley <ryanb@goddamnbastard.org>

Modified:
  head/usr.bin/gprof/gprof.c

Modified: head/usr.bin/gprof/gprof.c
==============================================================================
--- head/usr.bin/gprof/gprof.c	Mon Jan 12 21:30:22 2009	(r187115)
+++ head/usr.bin/gprof/gprof.c	Mon Jan 12 21:49:42 2009	(r187116)
@@ -165,7 +165,7 @@ main(argc, argv)
 	 *	get information from the executable file.
 	 */
     if ((Kflag && kernel_getnfile(a_outname, &defaultEs) == -1) ||
-      (elf_getnfile(a_outname, &defaultEs) == -1 &&
+      (!Kflag && elf_getnfile(a_outname, &defaultEs) == -1 &&
       aout_getnfile(a_outname, &defaultEs) == -1))
 	errx(1, "%s: bad format", a_outname);
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901122149.n0CLngA5077255>