Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gdb and trap frames



On Sat, Jan 12, 2008 at 07:07:01PM -0500, Nathan J. Williams wrote:
> David Laight <david%l8s.co.uk@localhost> writes:
> 
> > Does src/gnu/dist/gdb6/gdb/amd64nbsd-tdep.c have to be compilable
> > on non-netbsd systems (ie in the gne repo) ?
> 
> Yes. "*-tdep.c" files are target-dependent, and in general need to
> compile on all of GDB's supported host platforms. "*nat.c" files are
> for "native" functionality, and those can pull in less portable headers.

Hmmm... the user-space register frame stuff is in amd64bsd-nat.c, but
the kernel equivalent (for looking at kernel dumps) is in amd64nbsd-tdep.c

The former includes <machine/reg.h> (which contains the register list
we expose to userspace in a few places), the latter needs to know about
the kernel internal structure of the trap frame (for the register order).

So that actually seems backwards!

The actual definitions I want would be pulled in by including <machine/reg.h>
but only for 'current' ... I was thinking of putting in some defaults
if they can't be found that way.

        David

-- 
David Laight: david%l8s.co.uk@localhost



Home | Main Index | Thread Index | Old Index