delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/31/08:28:59

Date: Mon, 31 Jul 2000 15:27:45 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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: <F368F0759327D211B06A0008C728FB7370890C@SENSEI1>
Message-ID: <Pine.SUN.3.91.1000731152251.4529A-100000@is>
MIME-Version: 1.0
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019