This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: i386 Linux: provide correct type for orig_eax register
Mark Kettenis <kettenis@science.uva.nl> writes:
> Jim Blandy <jimb@zwingli.cygnus.com> writes:
>
> > This fixes a failure in callfuncs.exp.
>
> What failure?
gdb.base/callfuncs.exp: gdb function calls preserve register contents
GDB was actually preserving the registers' contents correctly. The
real problem is that GDB was returning the SSE registers' type for
orig_eax, so that the printed value included bits off the end of the
register array.
> > 2002-01-11 Jim Blandy <jimb@redhat.com>
> >
> > Return the correct virtual type for orig_eax.
> > * i386-linux-tdep.c (i386_linux_register_virtual_type): New function.
> > * config/i386/tm-linux.h (i386_linux_register_virtual_type): New
> > declaration.
> > (REGISTER_VIRTUAL_TYPE): Override definition in tm-i386.h; use the
> > Linux-specific version.
>
> Hmm. You're compiling GDB on a system that doesn't have
> PTRACE_GETFPXREGS in <sys/ptrace.h> isn't it?
Yep.
> In that case, I think your patch is just papering over a more
> fundamental flaw in the Linux/x86 port: not always including the SSE
> registers in the register file.
>
> I think we should #define HAVE_SSE_REGS unconditionally in
> config/i386/tm-linux.h. Later, when things are properly multi-arched,
> we can decide whether we actually display thos registers based on the
> actual processor model.
Okay. I'll give that a try.