Problems with 2.1 gcc/gdb

Problems with 2.1 gcc/gdb

Post by Bob Applega » Thu, 10 Oct 1996 04:00:00



This should probably go into a gnu group somewhere, but since
this is the default compiler included with FreeBSD, maybe someone
here can help.

We have an application with a LOT of floating point stuff in it,
many of the items being inside structures who have their pointers
passed around.  All of a sudden, we are getting exception 8,
floating point errors.  When I bring up gdb, it shows a line with
a simple comparision:

   if (mp->item1 < 0.0)

If I print mp->item1, a valid value displays.  If I make changes
to the code, then the weird FPE breaks seem to move around.  So
far, I can't find anything obviously wrong, ie, divide by zeros.
Adding a few lines of code will move where the error ocurrs!

Are there known problems with floating point operations?  How
about problems with debugging with gdb?

Any help appreciated!

Bob

 
 
 

Problems with 2.1 gcc/gdb

Post by J Wuns » Sun, 13 Oct 1996 04:00:00



> We have an application with a LOT of floating point stuff in it,
> many of the items being inside structures who have their pointers
> passed around.  All of a sudden, we are getting exception 8,
> floating point errors.  When I bring up gdb, it shows a line with
> a simple comparision:

>    if (mp->item1 < 0.0)

You haven't perchance fiddled with the FP exception mask in your
program?

--
cheers, J"org


Never trust an operating system you don't have sources for. ;-)