Bug 237872 - [PPC] can't print a 128-bit long double variable
Summary: [PPC] can't print a 128-bit long double variable
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: ppc64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On: 237637
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-25 19:47 UTC by Jan Kratochvil
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2007-04-25 21:15:13 UTC


Attachments (Terms of Use)
Testcase (reproducibility code, not a GDB style testcase). (700 bytes, text/plain)
2007-04-25 19:47 UTC, Jan Kratochvil
no flags Details
Fix. (5.04 KB, patch)
2007-04-25 19:47 UTC, Jan Kratochvil
no flags Details | Diff

Description Jan Kratochvil 2007-04-25 19:47:18 UTC
---Problem Description---
Gdb can't print a 128-bit long double variable
 
---uname output---
Linux devel 2.6.18-1.2714.el5 #1 SMP Mon Oct 2 17:17:28 EDT 2006 ppc64 ppc64
ppc64 GNU/Linux
 
---Steps to Reproduce---
[root@devbc1-9 brts]# gdb test
GNU gdb Red Hat Linux (6.5-8.fc6rh)
Copyright (C) 2006 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 "ppc64-redhat-linux-gnu"...Using host libthread_db li
                                                                           
brary "/lib64/libthread_db.so.1".

(gdb) b 39
Breakpoint 1 at 0x100006bc: file test.c, line 39.
(gdb) r
Starting program: /home/public/testbucket/brts/test
--- 128 bit Long double
Size of long double = 16

Breakpoint 1, main () at test.c:39
39        long_pld(i, ld2, vp1);  /* break here, print ld2, then continue */
(gdb) p ld2
$1 = Unrecognized 128-bit floating-point type.

 
Test run with the GDB version shipped with RHEL5 GA (unpatched)

>gdb) b 39
Breakpoint 1 at 0x100007e8: file long_double.c, line 39.
(gdb) r
Starting program: /home/luis/binaries/long_double-64
--- 128 bit Long double
Size of long double = 16

Breakpoint 1, main () at long_double.c:39
39        long_pld(i, ld2, vp1);  /* break here, print ld2, then continue */
(gdb) p ld2
$1 = Unrecognized 128-bit floating-point type.
(gdb) 
<

Test run with the patched version of GDB

>
(gdb) b 39
Breakpoint 1 at 0x100007e8: file long_double.c, line 39.
(gdb) r
Starting program: /home/luis/binaries/long_double-64
--- 128 bit Long double
Size of long double = 16

Breakpoint 1, main () at long_double.c:39
39        long_pld(i, ld2, vp1);  /* break here, print ld2, then continue */
(gdb) p ld2
$1 = 2.0000000000000000008673617379884035
(gdb)
<

Testsuite run with no regressions:

Unpatched Version:

# of expected passes            11142
# of unexpected failures        127
# of expected failures          42
# of known failures             61
# of unresolved testcases       1
# of untested testcases         4
# of unsupported tests          13

Patched version

# of expected passes            11174
# of unexpected failures        96
# of expected failures          42
# of known failures             60
# of unresolved testcases       1
# of untested testcases         4
# of unsupported tests          13

Comment 1 Jan Kratochvil 2007-04-25 19:47:18 UTC
Created attachment 153446 [details]
Testcase (reproducibility code, not a GDB style testcase).

Comment 2 Jan Kratochvil 2007-04-25 19:47:59 UTC
Created attachment 153447 [details]
Fix.

Comment 3 Jan Kratochvil 2007-04-25 21:15:13 UTC
Committed to Rawhide:
* Wed Apr 25 2007 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.6-12
- Enable PowerPC to print 128-bit long double variables (BZ 237872).

Testcases already present in GDB before, such as:
{-FAIL,+PASS}: gdb.base/sizeof.exp: print/f padding_long_double.v



Note You need to log in before you can comment on or make changes to this bug.