Bug 237872

Summary: [PPC] can't print a 128-bit long double variable
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: cagney
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-6.6-12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-25 21:15:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 237637    
Bug Blocks:    
Attachments:
Description Flags
Testcase (reproducibility code, not a GDB style testcase).
none
Fix. none

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