This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: multi-arch (was Re: Makefile setting)
- To: Stephane dot Bihan at arccores dot com
- Subject: Re: multi-arch (was Re: Makefile setting)
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 14 Apr 2000 12:39:10 +1000
- CC: gdb at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <OF170A1ECC.3969B3DA-ON802568C0.003270B9@risccores.com>
Stephane.Bihan@arccores.com wrote:
>
> Stephane.Bihan@arccores.com wrote:
> > >
> > > > > the ARC supported implementation of gdb we are trying to achieve is
> > > > > "extensible".
> > > > > The register description is minimal in the sense that only the
> basecase
> > > > > registers are described in REGISTER_NAMES.
> > > > > This description is updated (more registers are added) when we connect
> to
> > > the
> > > > > simulator.
> > > >
> > > > Hmm, I'd suggest investigating the multi-arch framework. It better
> > > > handles things like an architecture suddenly deciding it needs to be
> > > > changed. A target can also forced multi-arch to re-select its
> > > > architecture if needed.
> > > >
> > > > http://sourceware.cygnus.com/gdb/papers/multi-arch/
> > > >
> > > > For the register extensions, are they known by arcExtMap or are they
> > > > obtained from the target?
> > > >
> > > They are extracted from the object file.
> >
> > Good, multi-arch should definitly help. When a new object file is
> > presented to GDB the multi-arch framework is asked to identify it and
> > create an architecture for it. arc-tdep.c can be set up to identify
> > that information and set up things like the REGISTER_NAME
> > (REGISTER_NAMES is being given the boot :-) for the relevant target.
> >
> > Just a few speed bumps to climb over before it starts to help.
>
> That's a really good idea this multi-arch proposal!
A better description is probably a road map. MIPS, IA-64, D10V already
make use of the basic framework Several others (mn10300, SPARC, i386)
are all well down that same path. The rs6000 and SH are both on the hit
list.
> Just a shame I didn't read the paper before.
> I've implemented the REGISTER_NAMES initialisation in another way now.
> And I haven't got too much time to change it before sending you the sources of
> our ARC port.
To be clear and up front.
If someone contributes support for some new architecture then that new
architecture will need to use the multi-arch framework (see IA-64).
If someone contributes changes/fixes to an old target/architecture
(which would be your case I think) then those changes will need to be in
line with the general direction that multi-arch is taking. Post the
changes and lets see where it stands. It hopefully just involves simple
things like replacing your #define REGISTER_NAMES with #define
REGISTER_NAME(i) (arc_register_name (i)).
Andrew