This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/i386] Functions returning TYPE_CODE_ARRAY types ...
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: brobecker at adacore dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 9 Oct 2005 21:12:53 +0200 (CEST)
- Subject: Re: [RFA/i386] Functions returning TYPE_CODE_ARRAY types ...
- References: <20051008075513.GC22319@adacore.com>
> 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