This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/2370: print/display of float value with infinity is shown as zero (x86-64?)


>Number:         2370
>Category:       gdb
>Synopsis:       print/display of float value with infinity is shown as zero (x86-64?)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 28 15:58:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     greg.reynolds@arithmatica.com
>Release:        GNU gdb Red Hat Linux (6.5-15.fc6rh)
>Organization:
>Environment:
Linux turing 2.6.22.2-42.fc6 #1 SMP Wed Aug 15 11:52:47 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)

This GDB was configured as "x86_64-redhat-linux-gnu"

>Description:
Floating point variables with value "Inf" are incorrectly reported as having value "0" when examined in the debugger.
>How-To-Repeat:
In C++ program, 

float x = std::numeric_limits<float>::infinity();

Then in gdb:

(gdb) p x
$1 = 0

but if you do

(gdb) p /x *(int*)&x
$2 = 0x7f800000

Does not appear to happen on 32-bit version.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]