Is elf_gregset_t the correct type for all Linuxen?
Wed May 24 14:46:00 GMT 2000
Date: Wed, 24 May 2000 13:33:30 -0700
From: Michael Snyder <email@example.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
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
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.
More information about the Gdb-patches