From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199706202234.PAA22071@panda.mosberger> Date: Fri, 20 Jun 1997 15:34:46 -0700 From: David Mosberger-Tang Subject: Re: Additional weired behaviour of gdb > I recently had found another strange behaviour of gdb, regarding >double variables/functions. When you next-step over a function which >returns a double value you receive some strange results. The returned >value is totally arbitrary. if you set a break point after the >function call the result is correct. This is also the case when you >use functions (sin, cos) of math-lib. > > Have someone the same behaviour or is this specfic to my system? I >hope not. I have the same problem (I'm using Redhat 4.1). It's been driving me nuts, since just about all my code is floating point math using doubles. *sigh* Not a fix, but a workaround is to directly look at the floating point registers (assuming the variable in question really is in a register). Return values are passed in f0. E.g., "print $f0" would show print the return value of a function. The "step/i" and "dis" instructions are helpful in finding out what register to look at. If I recall correctly, I have had problems with floating point values in gdb on Linux/x86 as well. Maybe it's not an Alpha specific problem. I wish I could offer to look into this (and the other) gdb problems, but it doesn't look like I'll get to it soon. --david -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com