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: [RFA/commit] (SPARC/LEON) fix incorrect array return value printed by "finish"


>  I never used  ada and it looks like a bug in ada compiler not in gdb.
> Probably ada generates incorrect code for function which returns a small
> array.
> 
> The similar c  test works:
> % cat r.c
> #include <stdio.h>
> 
> typedef int __attribute__ ((vector_size (2 * sizeof(int)))) I2;

A vector and an array are not treated the same. So your example
is actually not quite equivalent. And this is the reason behind
the first part of my analysis that said we need to both check
TYPE_CODE_ARRAY *and* the TYPE_VECTOR flag.

You'll also note that I explicitly made sure that gnu_vectors.exp
still passes for me, and so I'm fairly sure that the "similar C test"
you cooked up above still works as well. But if you could give my patch
a try on Solaris to double-check (eg: by running gnu_vector.exp after
applying it), that would be a second confirmation.

-- 
Joel


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