[RFA/commit] (SPARC/LEON) fix incorrect array return value printed by "finish"

Joel Brobecker brobecker@adacore.com
Tue Apr 24 12:11:00 GMT 2018


>  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



More information about the Gdb-patches mailing list