This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] s390: Fix infcalls passing a single-field struct with static members
- From: Andreas Arnez <arnez at linux dot ibm dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Tue, 15 Oct 2019 14:23:23 +0200
- Subject: Re: [PATCH] s390: Fix infcalls passing a single-field struct with static members
- References: <m3tv8f5oc1.fsf@oc0404454431.ibm.com> <87wodb2n1h.fsf@tromey.com>
On Fri, Oct 11 2019, Tom Tromey wrote:
>>>>>> "Andreas" == Andreas Arnez <arnez@linux.ibm.com> writes:
>
> Andreas> The infcall-nested-structs test case yields 36 FAILs on s390x because GCC
> Andreas> and GDB disagree on how to pass a C++ struct like this as an argument to a
> Andreas> function:
>
> Andreas> struct s { float x; static float y; };
>
> Andreas> For the purpose of argument passing, GCC ignores static fields, while GDB
> Andreas> does not. Thus GCC passes the argument in a floating-point register and
> Andreas> GDB passes it via memory.
>
> Andreas> Fix this by explicitly ignoring static fields when detecting single-field
> Andreas> structs.
>
> FWIW this looked reasonable to me.
Thanks for having a look at this!
Pushed as ba18312d8f2cecf88b6edcbc277f433a62131e58.
--
Andreas