This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: long double in gdb for x86?


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