bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS: stepping over function returning float returns NaN with shared pthr


From: Ken Whaley
Subject: CVS: stepping over function returning float returns NaN with shared pthreads
Date: Thu, 12 Jul 2001 16:59:58 -0700

gdb-5.0rh-11 + CVS i386-tdep.c
(works with gdb 5.0)

% cat float.c
float sub( float a, float b )
{
    return a-b;
}

int
main( int argc, char **argv )
{
    float f;

    f = sub( 5.0, 0.0 );
    f = sub( 10.0, 0.0 );
}

% gcc -g float.c -o float -lpthread
% gdb float

GNU gdb Red Hat Linux 7.x (5.0rh-11)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) b main
Breakpoint 1 at 0x80483ea: file float.c, line 12.
(gdb) run
Starting program: /home/ken/src/float
[New Thread 1024 (LWP 7083)]
[Switching to Thread 1024 (LWP 7083)]

Breakpoint 1, main (argc=1, argv=0xbffff87c) at float.c:12
12          f = sub( 5.0, 0.0 );
(gdb) n
13          f = sub( 10.0, 0.0 );
(gdb) p f
$1 = -nan(0x400000)
(gdb) n
14      }
(gdb) p f
$2 = -nan(0x400000)
--
Ken Whaley
address@hidden <mailto:address@hidden>

This e-mail may contain confidential and privileged material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]