This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] gdbserver support for e500 / altivec


On Wed, Oct 17, 2007 at 12:09:32AM +0200, Ulrich Weigand wrote:
> Dan Jacobowitz wrote:
> 
> > 	* configure.srv: Use alternate register sets for powerpc64-*-linux*
> > 	with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
> > 	with SPE.
> 
> This uses a configure-time check whether __ALTIVEC__ is defined.  However,
> GCC for PowerPC by default does not define __ALTIVEC__, it does so only
> when using the -maltivec flag.  In any case, this is rather independent of
> whether the target system supports AltiVec or not ...

Not quite independent: if you built gdbserver with -maltivec (and
-mabi=altivec normally) then gdbserver will require altivec to run.
The other direction is a problem though.

> Why does this need to be a configure check in the first place?  Wouldn't
> it be much preferable if you could build a single gdbserver binary that
> would report the properties of the system it happens to be running on?

I agree.  But to do it that way, you need to make gdbserver support
multiple register cache layouts; multiple potential XML descriptions
to return as target.xml; and runtime detection of which register set
to use.

It's definitely doable (GDB does it).  I haven't found the time
yet, and this was easy.  So consider it a missing feature, or
a challenge :-)

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]