Re: gdb and asm/offsets.h
On Sat, Sep 15, 2007 at 02:02:38PM -0400, Kyle McMartin wrote:
> On Sat, Sep 15, 2007 at 01:46:57PM -0400, Daniel Jacobowitz wrote:
> > (Please CC me, I'm not on debian-hppa.)
> >
>
> Then why did you set Mail-Followup-To?
Mutt outsmarts me roughly all the time. Hopefully not this time.
> > GDB uses <asm/offsets.h> to find the offsets of registers in struct
> > pt_regs. The rest of the contents of this header aren't a public ABI,
> > but that bit is - unfortunately now it's in asm-offsets.h which is
> > never exported.
> >
> > Where should GDB get this data? For now, I made a hopefully correct
> > copy of the offsets and included it in GDB.
> >
>
> I assume gdb is fetching this with ptrace? What exactly does it need it
> for? Can you point at the relevant code in cvsweb or something?
What do you think it needs it for? :-) It needs to read the program's
registers; offsets into pt_regs are used for PTRACE_PEEKUSR and
PTRACE_POKEUSR.
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/hppa-linux-nat.c?cvsroot=src
--
Daniel Jacobowitz
CodeSourcery
Reply to: