Date: Mon, 7 Jul 1997 08:19:46 -0700 (PDT) Message-Id: <199707071519.IAA23833@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: 080970 AT bud DOT cc DOT swin DOT edu DOT au From: Nate Eldredge Subject: Re: Pseudo bugs? Cc: djgpp AT delorie DOT com Precedence: bulk >Im working on a ray tracer, using djgpp, and its mostly working, but i >kept getting sigfpe errors telling me that a co-processor wasn't found, >which is fine, cos im using a 486SX. But having/not having a >co-processor shouldn't make a differnce to the program, just make it >slower. So i ran symify, and narrowed it down to a particular function, >intsphere(). The respoonse from symify was something like: intsphere+219 >(BTW is the +219 number of characters? or something else) It's bytes in the executable, I think. The crash happened 219 bytes into intsphere. A debugger might be able to do something with this. > This wasn't >much help, so i recompiled using the -g switch, so symify would give me a >valid number. But it didn't give me a vaild dumpfile, the program >actually stop giving me the error!! It now seems to work ok, just by >placing -g into the compile line. Odd. What happens when you strip it? I would suggest you look through the offending function with a debugger, and see what (if any) floating-point instructions get used. Then look again without -g and compare. AFAIK, -g isn't supposed to generate any different code, just add the debugging info. Are you sure you didn't use any other switches differently? > >This is my 2nd weird experience with my program, the 1st being that some >variables wouldn't initialize properly (they read from the command line) >and i could do nothing about it, but then i placed the variable >declaration the next line down in the source code, and it worked. >(eg i had: int x,y,flag; and x and y wouldn't work, but i changed it to >int flag; >int x,y; >and it worked fine) Now *that's* weird. I'd like to see a fragment of that. Maybe looking at the assembly the compiler makes would be enlightening. Nate Eldredge eldredge AT ap DOT net