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/i386] Functions returning TYPE_CODE_ARRAY types ...


> Date: Sat, 8 Oct 2005 00:55:13 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> 
> Hello,
> 
> One of our users just came across this on an i386-linux machine.
> He tried to do a "finish" on a function that returns an array whose
> size is statically known. This is not possible in C, but this can be
> done in Ada. Consider the following code:

Dunno any Ada, but...
> 
> The problem is that the the i386 struct-return code did not expect
> a function whose return type is a TYPE_CODE_ARRAY. This case is not
> mentioned as far as I could tell in the ABI, but the array is returned
> the same way records would be.
> 
> The attached patch implements this.
> 
> 2005-10-07  Joel Brobecker  <brobecker@adacore.com>
> 
>         * i386-tdep.c (i386_reg_struct_return_p): Allow array types as well.
>         (i386_return_value): Add handling for functions that return array
>         types.

...this makes sense to me.  Please go ahead.

Mark


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