gregset vs prgregset vs elf_gregset in thread_db
Daniel Jacobowitz
dmj+@andrew.cmu.edu
Mon Jun 18 12:06:00 GMT 2001
The thread-db routines are defined to take arguments of type 'prgregset_t'.
On about half the supported architectures, prgregset_t is typedef'd to be
'gregset_t'; on the other half it is 'elf_gregset_t'. I don't know where
the gregset_t definitions came from, especially on platforms that have
always been ELF, but they are substantially less useful than their elf
counterparts - what we really want to fill in is the data we can get from
ptrace, and pt_regs is usually fairly similar to an elf_gregset_t and an
elf_fpregset_t.
For instance, on PowerPC the NIP is not in any of r0 - r31, and a gregset_t
only has 32 elements. No way to convey the thread's NIP, which makes
debugging all but meaningless.
The only consumer of the prgregset_t and prfpregset_t types is thread-db.
Is there any objection to changing them to the elf_* variants, and possibly
bumping the thread-db soname? Although I'm not sure the latter is even
necessary; gdb is the only consumer of thread-db I've ever found on linux,
and it doesn't work with threads on the architectures affected yet anyway.
--
Daniel Jacobowitz Debian GNU/Linux Developer
Monta Vista Software Debian Security Team
More information about the Libc-alpha
mailing list