This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: gdb in CVS is totally broken on Linux/i386
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Re: gdb in CVS is totally broken on Linux/i386
- From: Jim Blandy <jimb at cygnus dot com>
- Date: 15 Nov 1999 16:53:16 -0500
- Cc: gdb at sourceware dot cygnus dot com
- References: <19991115191414.399EE1B493@ocean.lucon.org>
> > What is happening inside the `if (GETXFPREGS_SUPPLIES (regno))'
> > clause? Why isn't fetch_xfpregs providing the information accurately?
> >
>
> GETFPREGS_SUPPLIES is defined and never used. Should it be a little
> faster to check GETFPREGS_SUPPLIES first to get the normal fp
> registers?
I think it's faster to use PTRACE_GETXFPREGS if it's available, since
that gives you both the FP and the SSE registers in one system call.
> > If you are running a very bleeding-edge kernel, Doug Ledford may have
> > changed the format of `struct i387_hard_fxsave'. That would
> > definitely give you garbage values for your FP registers. My changes
> > are only meant to work with the kernel patches posted on
> > sourceware.cygnus.com.
>
> I am using Doug's P3 patch. Apparently he didn't handle
> i387_hard_fxsave right between kernel and user space. I
> have sent him detailed bug report. I hope he will fix it
> soon.
See, I think there are several versions of Doug's patches flying
around. In the one that GDB expects at the moment, the kernel's
struct i387_hard_fxsave contains both an FSTENV-format and an
FXSAVE-format record, because Doug's patch uses both instructions
during a context switch --- the FP control registers are saved twice.
PTRACE_GETXFPREGS gives you the whole thing.
However, in a more recent version of Doug's patch (which I have not
yet gotten to work), he uses only the FXSAVE instruction, which is
more efficient. But this means that the data accessed by
PTRACE_GETXFPREGS is different from what GDB expects.