summaryrefslogtreecommitdiff
path: root/usr.bin/gprof
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2009-01-12 21:49:42 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2009-01-12 21:49:42 +0000
commit03ce1875647ae063a09fafa978aa6d423d2d1755 (patch)
treeccd5592d1e28bd26bf4fa2d17db739467de021c9 /usr.bin/gprof
parente71400183da4c5c7c5801a3552c559bffcfc81a4 (diff)
downloadsrc-test-03ce1875647ae063a09fafa978aa6d423d2d1755.tar.gz
src-test-03ce1875647ae063a09fafa978aa6d423d2d1755.zip
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>
Notes
Notes: svn path=/head/; revision=187116
Diffstat (limited to 'usr.bin/gprof')
-rw-r--r--usr.bin/gprof/gprof.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/gprof/gprof.c b/usr.bin/gprof/gprof.c
index cfb9fab2cc9bd..dc9e8a5bb4716 100644
--- a/usr.bin/gprof/gprof.c
+++ b/usr.bin/gprof/gprof.c
@@ -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);
/*