This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
FW: gprof command line arguments to profiled program?
- From: "Stefan Berglund" <Stefan dot Berglund at mobeon dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Thu, 16 Nov 2006 11:08:53 +0100
- Subject: FW: gprof command line arguments to profiled program?
Don't bother to answer my mail below, I thought that gprof ran the
program.. I didn't get that I should first run it myself, and then
analyse the gmon.out output. *feel stupid*.. Sorry about that.
/S
-----Original Message-----
From: Stefan Berglund
Sent: den 16 november 2006 10:34
To: 'binutils@sources.redhat.com'
Subject: gprof command line arguments to profiled program?
Hello,
I'm trying to run gprof on openldap:s slapd daemon on sun solaris2.8,
however, I can't get command line arguments sent to slapd, for example:
"gprof ./slapd -h" gives me the usage of gprof. But the -h switch was
meant to slapd, not to gprof.
I have built binutils-2.17 on sparc, solaris.. I added a -m64 flag in
the configure script for making it 64bit, other than that, I ran
./configure and make. gcc version 3.4.2.
From what I have read, gprof should support sending arguments to the
profiled program? But I can't see how it's done from looking in the code
(I'm no expert at all though).
From gprof.c, it does "expandargv()" - I don't really know what this one
does.. Maybe this one should take care of the command line arguments
aimed for the profiled program somehow..?
And later on..
a_out_name = argv[optind++];
I guess that line should get "slapd" as a_out_name .. or can/should it
get "slapd -h" ?
And then, later on, a_out_name is passed to core_init .. etc.
I'd really apprecciate some hints on how to invoke command line
arguments to the binary, or some workaround.. Anything! :)
Thanks!
Stefan Berglund