This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
long double in gdb for x86?
- To: gdb@cygnus.com
- Subject: long double in gdb for x86?
- From: hjl@lucon.org (H.J. Lu)
- Date: Sat, 23 May 1998 17:19:48 -0700 (PDT)
- Cc: egcs@cygnus.com, libc-hacker@cygnus.com (GNU C Library)
Hi,
I managed to add FP number support to gdb for Linux/x86. But I have a
problem with the FP number print in gdb:
(gdb) info all
ebx 0x4000ac64 1073785956
ecx 0x4 4
edx 0x4009c808 1074382856
esi 0x1 1
edi 0x80483fc 134513660
ebp 0xbffffbe8 0xbffffbe8
eax 0x8048530 134513968
ds 0x2b 43
es 0x2b 43
fs 0x2b 43
gs 0x2b 43
orig_eax 0xffffffff -1
eip 0x80484e1 0x80484e1
cs 0x23 35
eflags 0x286 646
esp 0xbffffbd8 0xbffffbd8
ss 0x2b 43
fctrl 0xffff037f -64641
fstat 0xffff3000 -53248
ftag 0xffff0fff -61441
fip 0x80484db 134513883
fcs 0x5050023 84213795
fopoff 0x8048554 134514004
---Type <return> to continue, or q <return> to quit---
fopsel 0xffff002b -65493
st0 -5.7277807836949922e+250 (raw 0x4003f400000000000000)
st1 -0 (raw 0x3ffe8000000000000000)
st2 0 (raw 0x00000000000000000000)
st3 0 (raw 0x00000000000000000000)
st4 -1.0842021724855044e-19 (raw 0x4003bc00000000000000)
st5 -3.0649910817317777e+54 (raw 0x4007cb40000000000000)
st6 0 (raw 0x00000000000000000000)
st7 0 (raw 0x00000000000000000000)
(gdb) p $st0
$1 = -5.7277807836949922e+250
(gdb) whatis $st0
type = double
(gdb) p (long double) $st0
Can't deal with a floating point number of 16 bytes.
(gdb)
The problem is the FP number in x87 register is stored in long double
format. But gdb doesn't know how to print them. I was wondering if
anyone had added x87 long double support to gdb.
Thanks.
--
H.J. Lu (hjl@gnu.org)