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

Joel Brobecker brobecker@adacore.com
Mon Apr 30 22:51:00 GMT 2018


Hi Vladimir,

On Tue, Apr 24, 2018 at 05:11:36AM -0700, Joel Brobecker wrote:
> >  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.

Was my explanation satisfactory to you? Did you want to test my change
on Solaris before we decide whether to go for this patch or not?

-- 
Joel



More information about the Gdb-patches mailing list