long double in gdb for x86?

H.J. Lu hjl@lucon.org
Sat May 23 23:12:00 GMT 1998

> hjl@lucon.org (H.J. Lu) writes:
> > 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.
> There is already a patch for FP register support.  It works quite well
> if the underlying kernel has the needed functionality.  We only have
> to add some code which does gdb not complain if the kernel is too old.
> I think the gdb home page has a link to the code and I've also sent
> the code to the libc-hacker list some time ago.

Thanks. I found it. It has what I am looking for. My patch is
a little bit different:

1. It is faster.
2. It doesn't need any kernel patch.
3. The same source compiles for any linux kernels with ptrace support.
   But the resulting gdb binary won't get the FP register support if
   the kernel header files do not have the necesary stuff.
4. The binray compiled with the FP register support works on any
   linux kernels with ptrace support. But you won't get the FP register
   information if the kernel doesn't support it.

I will combine mine with that one.

H.J. Lu (hjl@gnu.org)

More information about the Gdb mailing list