[gdb/tdep] Handle static field in i386_16_byte_align_p
authorTom de Vries <tdevries@suse.de>
Fri, 4 Dec 2020 12:36:48 +0000 (13:36 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 4 Dec 2020 12:36:48 +0000 (13:36 +0100)
commitb6a6aa07c5bd53d19c33db1f7c9645fc99b66e1b
treed92091f20cd5b55c941143e3e355f9b8fff93612
parenta8d136756b9882f90311af7205a00c0d97fea64d
[gdb/tdep] Handle static field in i386_16_byte_align_p

When running test-case on gdb.cp/many-args.exp with target board unix/-m32, I
run into:
...
(gdb) p check_val (ref_val, ref_val, ... , ref_val, ref_val)^M
$1 = false^M
(gdb) FAIL: gdb.cp/many-args.exp: check passing many structures
...

The test source contains struct ss:
...
typedef int v4si __attribute__ ((vector_size (16)));

struct ss
{
  static v4si static_field;
  unsigned char aa;
};
...
and i386_16_byte_align_p returns true for this type.

Fix this by skipping static fields in i386_16_byte_align_p.

Tested on x86_64-linux.

gdb/ChangeLog:

2020-12-04  Tom de Vries  <tdevries@suse.de>

PR tdep/27007
* i386-tdep.c (i386_16_byte_align_p): Skip static fields.
gdb/ChangeLog
gdb/i386-tdep.c