This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


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

Re: gdb in CVS is totally broken on Linux/i386



> > The register fetch/store codes in i386-linux-nat.c are mostly bogus.
> 
> Oooops. Egg on my face. It was my fault. Here is a small patch.

Sorry, I should read ahead.

What is happening inside the `if (GETXFPREGS_SUPPLIES (regno))'
clause?  Why isn't fetch_xfpregs providing the information accurately?

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.

Have Doug's changes made it into the 2.3.x line yet?  If so, then I'll
assume they've taken a (relatively) stable form, and I should adapt my
kernel patches, too.


> Index: i386-linux-nat.c
> ===================================================================
> RCS file: /work/cvs/gnu/gdb/gdb/i386-linux-nat.c,v
> retrieving revision 1.1.1.3
> diff -u -p -r1.1.1.3 i386-linux-nat.c
> --- i386-linux-nat.c	1999/11/12 20:16:57	1.1.1.3
> +++ i386-linux-nat.c	1999/11/12 22:07:08
> @@ -539,6 +562,12 @@ fetch_inferior_registers (int regno)
>        return;
>      }
>  
> +  if (GETFPREGS_SUPPLIES (regno))
> +    {
> +      fetch_fpregs ();
> +      return;
> +    }
> +
>    if (GETXFPREGS_SUPPLIES (regno))
>      {
>        if (fetch_xfpregs ())

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