[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb-patches
Subject:    [RFC] Detecting and printing 128-bit long double values for PPC
From:       luisgpm () linux ! vnet ! ibm ! com (Luis Machado)
Date:       2007-04-30 18:03:00
Message-ID: 1177942333.15264.34.camel () localhost
[Download RAW message or body]

Doing a test run with patched version of GDB, i tried "sizeof"-ing the
long double variable on both binaries (one built with -mlong-double-128
and the other with -mlong-double-64).

GDB treats them differently, showing an 8-bytes length for the 64-bit
long double binary and 16-bytes for the 128-bit long double binary.

* 64-bit long doubles

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

* 128-bit long doubles

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

Somehow GDB seems to handle them in different ways.

Regards,
Luis


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic