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"


Hi Joel,

On 04/30/2018 03:51 PM, Joel Brobecker wrote:
> 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?

  yes.  Your fix looks good to me.

-Vladimir

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


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