From: David Mosberger-Tang <davidm@azstarnet.com>
Subject: Re: Additional weired behaviour of gdb
Date: Fri, 20 Jun 1997 15:34:46 -0700 [thread overview]
Message-ID: <199706202234.PAA22071@panda.mosberger> (raw)
> 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
next reply other threads:[~1997-06-20 22:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-06-20 22:34 David Mosberger-Tang [this message]
1997-06-21 0:01 ` Cheap monitor for UDB D. Steven Daniel
-- strict thread matches above, loose matches on Subject: below --
1997-06-20 19:55 Additional weired behaviour of gdb J
1997-06-20 19:05 Torsten Zirzlaff
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox