This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Is elf_gregset_t the correct type for all Linuxen?
- To: msnyder at cygnus dot com
- Subject: Re: Is elf_gregset_t the correct type for all Linuxen?
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Wed, 24 May 2000 23:46:46 +0200
- CC: gdb-patches at sourceware dot cygnus dot com, jimb at cygnus dot com, kettenis at wins dot uva dot nl, drepper at cygnus dot com
- References: <392C3C9A.C4C@cygnus.com>
Date: Wed, 24 May 2000 13:33:30 -0700
From: Michael Snyder <msnyder@cygnus.com>
We have a function supply_gregset which is defined in a
number of *-linux-nat.c files. There's some confusion
about the data type of it's argument. In many instances
it is defined as "gregset_t", but I understand that that
data type is used in several places in Linux and is not
always defined in the same way.
Yes. It's similar to Solaris where you have gregset_t (used for user
contexts) and prgregset_t (used in the proc interface and core dumps),
except that some libc versions use the gregset_t type for both. To
add to the confusion recent versions of glibc also typedef
prgregset_t, and this was broken on i386 for prfpregset_t with glibc
2.1.3.
Now, i386-linux-nat.c uses a different data type for
this function, "elf_gregset_t". I'm wondering if all
the flavors of Linux gdb should be using this type
as well?
All Linux architectures define elf_gregset_t, and AFAICT this always
is the right definitions to use for core dumps and in ptrace requests.
On architectures other than the i386 gregset_t will probably work,
unless the i386 implementation was blindly copied.
Mark