This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] x86-64 targeted gdb and corefiles
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Jason R Thorpe <thorpej at wasabisystems dot com>,Michal Ludvig <mludvig at suse dot cz>,GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: Mon, 27 May 2002 14:40:29 -0400
- Subject: Re: [RFC] x86-64 targeted gdb and corefiles
- References: <3CF24B2A.3070305@suse.cz> <20020527111157.A22765@dr-evil.shagadelic.org>
On Mon, May 27, 2002 at 11:11:57AM -0700, Jason R Thorpe wrote:
> On Mon, May 27, 2002 at 05:05:14PM +0200, Michal Ludvig wrote:
>
> > Hi all,
> > this patch allows reading of coredumps on non-native gdb configured for
> > x86-64 target. It works pretty well in this form, but I had to modify
> > gregset.h, what is unwise. I know I have to move the modifications
> > somewhere else, but ... where? Can someone give me an advice, please?
>
> Take a look at e.g. mipsnbsd-nat.c and mipsnbsd-tdep.c (I'm slowly
> making all NetBSD configurations fully cross-debug'able, and MIPS
> and SH are good examples of my strategy).
>
> As far as I'm concerned, it's simply not appropriate to be using generic
> "regset" routines, because the names of those routines inherently make
> them impossible to use for cross-debugging, especially in a truly multi-arch
> environment (or even one as simple as "32-bit code running on x86-64").
Seconded; perhaps with all the attention cross cores have been getting
lately it's time for a better framework for this? I was thinking
something like:
struct regset_handler {
enum type regset_kind; /* general, FP, extended */
int size;
void (*supply)();
void (*fetch)();
};
See gdbserver's regset handling for a more concrete example of this.
This could be used to kill all the duplicate copies of core-regset.c
that have made their way into i386 and powerpc tdep files.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer