s390: Fix infcalls passing a single-field struct with static members
authorAndreas Arnez <arnez@linux.ibm.com>
Tue, 15 Oct 2019 12:20:14 +0000 (14:20 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Tue, 15 Oct 2019 12:20:14 +0000 (14:20 +0200)
commitba18312d8f2cecf88b6edcbc277f433a62131e58
treef1083c75b6db6a816e3e9f05e6f608c8150e1de9
parent9a73315161bc07d958060847ae01996312e1b30f
s390: Fix infcalls passing a single-field struct with static members

The infcall-nested-structs test case yields 36 FAILs on s390x because GCC
and GDB disagree on how to pass a C++ struct like this as an argument to a
function:

  struct s { float x; static float y; };

For the purpose of argument passing, GCC ignores static fields, while GDB
does not.  Thus GCC passes the argument in a floating-point register and
GDB passes it via memory.

Fix this by explicitly ignoring static fields when detecting single-field
structs.

gdb/ChangeLog:

* s390-tdep.c (s390_effective_inner_type): Ignore static fields
when unwrapping single-field structs.
gdb/ChangeLog
gdb/s390-tdep.c
This page took 0.030103 seconds and 4 git commands to generate.