Message ID | 20160123161811.1c92dd3d@pinnacle.lan |
---|---|
State | New, archived |
Headers |
Received: (qmail 60927 invoked by alias); 23 Jan 2016 23:18:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 60915 invoked by uid 89); 23 Jan 2016 23:18:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=noproto, Argument, 8138, sk:type_co X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 23 Jan 2016 23:18:15 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id BD833C0AC923 for <gdb-patches@sourceware.org>; Sat, 23 Jan 2016 23:18:13 +0000 (UTC) Received: from pinnacle.lan (ovpn-113-155.phx2.redhat.com [10.3.113.155]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0NNICiA027060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO) for <gdb-patches@sourceware.org>; Sat, 23 Jan 2016 18:18:13 -0500 Date: Sat, 23 Jan 2016 16:18:11 -0700 From: Kevin Buettner <kevinb@redhat.com> To: gdb-patches@sourceware.org Subject: [PATCH] rx: Treat scalars larger than 8 bytes as aggregates in rx_push_dummy_call Message-ID: <20160123161811.1c92dd3d@pinnacle.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes |
Commit Message
Kevin Buettner
Jan. 23, 2016, 11:18 p.m. UTC
This patch fixes the following failures (which are also GDB internal errors) for the -m64bit-doubles multilib: FAIL: gdb.base/callfuncs.exp: p t_double_complex_values(dc1, dc2) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_double_complex_values(dc3, dc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_double_complex_many_args(dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_double_complex_many_args(dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_values(ldc1, ldc2) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_values(ldc3, ldc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_many_args(ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_many_args(ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1,ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_values(dc1, dc2) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_values(dc3, dc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_many_args(dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_many_args(dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_values(ldc1, ldc2) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_values(ldc3, ldc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_many_args(ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_many_args(ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1,ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1) (GDB internal error) FAIL: gdb.base/varargs.exp: print find_max_double_real(4, dc1, dc2, dc3, dc4) (GDB internal error) FAIL: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4) (GDB internal error) The assertion failure which is tripped is: gdb_assert (arg_size <= 4); While it may seem that the patch ought to disallow scalars larger than 4, scalars of size 8 are explicitly handled by the code elsewhere. This came up because gcc has a complex type that is 16 bytes in length when 64-bit doubles are used. gdb/ChangeLog: * rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8 bytes as aggregates. --- gdb/rx-tdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
Hi Kevin, > gdb/ChangeLog: > > * rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8 > bytes as aggregates. I'll trust you on RX matters, and the contents of the message seems to indicate that you would have tested the change using our testsuite, so... OK with me! :-) > --- > gdb/rx-tdep.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c > index 2732608..904aebd 100644 > --- a/gdb/rx-tdep.c > +++ b/gdb/rx-tdep.c > @@ -813,7 +813,8 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, > struct_addr); > } > else if (TYPE_CODE (arg_type) != TYPE_CODE_STRUCT > - && TYPE_CODE (arg_type) != TYPE_CODE_UNION) > + && TYPE_CODE (arg_type) != TYPE_CODE_UNION > + && arg_size <= 8) > { > /* Argument is a scalar. */ > if (arg_size == 8)
On Tue, 26 Jan 2016 16:39:38 +0400 Joel Brobecker <brobecker@adacore.com> wrote: > Hi Kevin, > > > gdb/ChangeLog: > > > > * rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8 > > bytes as aggregates. > > I'll trust you on RX matters, and the contents of the message > seems to indicate that you would have tested the change using > our testsuite, so... > > OK with me! :-) Hi Joel, Thanks for looking it over. It's pushed now. Kevin
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c index 2732608..904aebd 100644 --- a/gdb/rx-tdep.c +++ b/gdb/rx-tdep.c @@ -813,7 +813,8 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct_addr); } else if (TYPE_CODE (arg_type) != TYPE_CODE_STRUCT - && TYPE_CODE (arg_type) != TYPE_CODE_UNION) + && TYPE_CODE (arg_type) != TYPE_CODE_UNION + && arg_size <= 8) { /* Argument is a scalar. */ if (arg_size == 8)