From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/tdep] Handle static field in i386_16_byte_align_p
Date: Fri, 4 Dec 2020 13:37:59 +0100 [thread overview]
Message-ID: <20201204123758.GA4771@delia> (raw)
Hi,
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.
Committed to trunk.
Thanks,
- Tom
[gdb/tdep] Handle static field in i386_16_byte_align_p
gdb/ChangeLog:
2020-12-03 Tom de Vries <tdevries@suse.de>
PR tdep/27007
* i386-tdep.c (i386_16_byte_align_p): Skip static fields.
---
gdb/i386-tdep.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 00de4e1ccb..ad02ad679b 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -2644,6 +2644,8 @@ i386_16_byte_align_p (struct type *type)
int i;
for (i = 0; i < type->num_fields (); i++)
{
+ if (field_is_static (&type->field (i)))
+ continue;
if (i386_16_byte_align_p (type->field (i).type ()))
return 1;
}
reply other threads:[~2020-12-04 12:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201204123758.GA4771@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox