---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
Created attachment 153446 [details] Testcase (reproducibility code, not a GDB style testcase).
Created attachment 153447 [details] Fix.
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