This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: gregset vs prgregset vs elf_gregset in thread_db


> Date: Mon, 25 Jun 2001 19:05:57 -0700
> From: Daniel Jacobowitz <dmj+@andrew.cmu.edu>

> On Mon, Jun 18, 2001 at 12:06:08PM -0700, Daniel Jacobowitz wrote:
> > 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.
> 
> It seems that no one had any comments about this at all.  I'll submit a
> patch shortly to change the typedefs, then, and see if that gets a
> little more reaction.

I don't believe anything other than gdb uses these structures.  They
don't reflect anything that the kernel produces, do they?

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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