Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Additional weired behaviour of gdb
@ 1997-06-20 19:05 Torsten Zirzlaff
  0 siblings, 0 replies; 3+ messages in thread
From: Torsten Zirzlaff @ 1997-06-20 19:05 UTC (permalink / raw)


Hi.

  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.

Ciao

	Torsten

-- 
s-mail: Dudenstr. 24                                          Torsten Zirzlaff
	10965 Berlin	(official) http://satchmo.physik.tu-berlin.de/~zirzlaff
	Germany		          e-mail : zirzlaff@nienor.in-berlin.de
phone: +49 30 789 90 144		   zirzlaff@satchmo.physik.tu-berlin.de
data:  +49 30 789 90 145 

+-----------------------------------------------------------------------------+
|  The shortest unit of time in the universe is the New York Second, defined  |
|  as the period of time between the traffic lights turning green and the cab |
|  behind you honking. -- Terry Pratchett 'Lords and Ladies'                  |
+-----------------------------------------------------------------------------+

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re:  Additional weired behaviour of gdb
@ 1997-06-20 19:55 J
  0 siblings, 0 replies; 3+ messages in thread
From: J @ 1997-06-20 19:55 UTC (permalink / 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*

- J

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Additional weired behaviour of gdb
@ 1997-06-20 22:34 David Mosberger-Tang
  0 siblings, 0 replies; 3+ messages in thread
From: David Mosberger-Tang @ 1997-06-20 22:34 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-06-20 22:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-06-20 19:55 Additional weired behaviour of gdb J
  -- strict thread matches above, loose matches on Subject: below --
1997-06-20 22:34 David Mosberger-Tang
1997-06-20 19:05 Torsten Zirzlaff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox