Date: Mon, 31 Jul 2000 15:27:45 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Pierre AT Sensei-ltd DOT com cc: djgpp AT delorie DOT com Subject: Re: Crash when compiling with -gp option ! In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 31 Jul 2000 Pierre AT Sensei-ltd DOT com wrote: > Sorry to bother you once more about this, but I finally found an Internet > access and so I could find a patch for gprof (a version of the file mcount.c > I retrieved from a mail sent the 8 Jan 1998). > I installed it doing this: > gcc -O3 -c mcount.c > ar rvs d:/djgpp/lib/libc.a mcount.o > But once installed, my program still bugs when I link it with "-gp" option > with this error from NT : > The instruction at "0x0f00115e" referenced memory qt "0xffffffff". The > memory could not be "read" This is a known NT bug: profiling uses a timer (to sample the program counter during execution), but programs that use timers crash on NT. See section 3.3 of the DJGPP FAQ list for more details. There's no work-around, unfortunately. If you have access to a DOS or a Windows 9X machine, where timers work, profile your program there. Also, you don't tell what version of DJGPP and Gprof did you use. Versions of the library before v2.03 had various problems with timers that affected profiling; see sections 13.2 and 13.3 of the FAQ.