This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: cross-debugging of userland core files, nat -> tdep
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: thorpej at wasabisystems dot com
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 11 Apr 2002 02:01:24 -0400
- Subject: Re: cross-debugging of userland core files, nat -> tdep
- References: <20020410183918.C22095@dr-evil.shagadelic.org>
> Hi folks...
>
> I've been thinking of what needs to happen in order to support
> cross-debugging of userland core files in NetBSD.
>
> BFD can already handle NetBSD ELF core files in the appropriate way. As
> far as I can tell, the only stumbling block is getting GDB to play nicely
> with them.
>
> The problem is that the functions that supply registers, etc. from the core
> file are all in "nat" modules. This is probably mostly an artifact of the
> data being in the same format as the reg structure returned by ptrace(2).
>
> What I'd like to do is move those supply-registers routines into an
> appropriate "tdep" file. They can still be used by the "nat" routines
> which use ptrace(2), and all the core file handling goo can then go into
> the "tdep" module, as well.
>
> If this sounds reasonable, then I'll start my little project. Otherwise,
> I'd love to hear suggestions :-)
>
> Thanks.
Have a look at sparc-tdep.c:supply_fpregset(). Depending on how
``pure'' your elf core files are you could do similar. If not
archnbsd-tdep.c sounds promising.
There is a namespace problem here (these methods most likely also need
to be multi-arched in someway, but that is a separate story).
Andrew