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: [rfc] PowerPC ABI detection and overrides


On Mon, Oct 29, 2007 at 07:11:27PM +0100, Ulrich Weigand wrote:
> > You will need
> > a relatively current GCC and very current linker for the auto tests
> > to all pass.
> 
> Any chance of making those tests XFAIL instead of FAIL if the
> toolchain is too old?

Most will pass anyway.  The default ABI selection is going to be
AltiVec because the default set of registers include AltiVec
registers.  I'll try to find some tools I can use to confirm that
before I check it in though.

I can probably come up with an XFAIL approach.  I'll need some other
way to check that the attributes are present.  Maybe objdump.

> However, this may not be quite as bad as it seems:  note that while
> in your bugzilla report, you're refering to use of "__vector int",
> this actually doesn't work:  the "AltiVec vector" types introduced
> via the __vector or vector keywords are only available in the first
> place if you use -maltivec; otherwise that code is rejected with a
> syntax error anyway.

Thanks, I'd forgotten about that.

> So I would suggest that GDB interprets the "generic" case always
> as the "-maltivec -mabi=no-altivec" situation, and expects 16-byte
> vector return values in general-purpose registers.  This would also
> fix our test cases (as those use the Altivec vector syntax and thus
> reqiure -maltivec anyway).

Interesting.  Very interesting.  I'll double-check that this works
and switch to it if it does.  Then maybe I can test more of the cases.

> Hmmm, I would have hoped we could get away from directly refering
> to the BFD in the gdbarch_init routine ...   It would be nicer to
> more strictly distinguish between detecting ABI properties from
> the BFD (in the *sniffer*), and installing an gdbarch handler 
> supporting a particular set of ABI properties (in the gdbarch_init
> routine).
> 
> This would allow to request a specific gdbarch in the situation
> where you know exactly which ABI properties you need, but don't
> have any BFD handy ...

Can you give me an example of when you want to do that?  In general
I've been moving away from it - there's too much extra bookkeeping
that the BFD does for us.

-- 
Daniel Jacobowitz
CodeSourcery


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