Date: Tue, 27 Feb 1996 13:20:23 +0200 (IST) From: Eli Zaretskii To: Martynas Kunigelis Cc: DJGPP m/l Subject: Re: gprof problems In-Reply-To: <199602270921.EAA04383@delorie.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 27 Feb 1996, Martynas Kunigelis wrote: > First, I have read the FAQ, but found nothing... The problem is: whenever I > try to run gprof on a COFF image compiled with the -pg switch, it complains > about a missing file `gmon.out'. `gmon.out' is the file that gets created by your program when you run it. Do you mean that you run the program compiled with -pg, but no `gmon.out' is created? > However, if I simply run `redir -t' on my > program, the mentioned file is created and I can run gprof OK. I studied the > sources of redir, it just merely calls time() if the -t switch is specified. > So what gives? I've no idea. That may mean that your program somehow tweaks the file handle that is used to write to `gmon.out', or that DJGPP has a bug that goes away when the standard handles are redirected by `redir'.