*BSD News Article 80343


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!cancer.vividnet.com!hunter.premier.net!feed1.news.erols.com!netaxs.com!sea.waterw.com!usenet
From: bob@waterw.com (Bob Applegate)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Problems with 2.1 gcc/gdb
Date: 9 Oct 1996 15:08:44 GMT
Organization: Water Wheel Systems
Lines: 24
Message-ID: <53gf5s$2qk@sea.waterw.com>
NNTP-Posting-Host: newt.waterw.com
X-Newsreader: WinVN 0.92.5

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