This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] Altivec ABI patches


Jim Blandy <jimb@redhat.com> writes:
> Elena Zannoni <ezannoni@redhat.com> writes:
> > Jim Blandy writes:
> >  > 
> >  > I don't see anything here that prevents vectors from being coerced to
> >  > pointers to their first element.  Isn't there some change needed in
> >  > evaluate_subexp_with_coercion?
> > 
> > You mean value_arg_coerce()?
> 
> Err, ... yeah, that's what I meant.  :)

Wait, no.  If `v' is a vector variable, and the user types `print v +
2', that should be an error, right?  But somehow it'll get promoted to
a pointer to its first element.  value_add calls COERCE_NUMBER, which
calls COERCE_ARRAY.  I think that's what you need to fix.  Note that
value_subscript already handles arrays specially --- it doesn't depend
on C's array coercion --- so it should continue to work.  I think.

You may have already done this, but I'd grep for TYPE_CODE_ARRAY and
make sure each case is handled properly.


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