Message ID | 20171207233015.18656-1-sergiodj@redhat.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 67385 invoked by alias); 7 Dec 2017 23:30:29 -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 67273 invoked by uid 89); 7 Dec 2017 23:30:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=gi 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 ESMTP; Thu, 07 Dec 2017 23:30:21 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1E343BDF7 for <gdb-patches@sourceware.org>; Thu, 7 Dec 2017 23:30:20 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTP id 643701F8; Thu, 7 Dec 2017 23:30:17 +0000 (UTC) From: Sergio Durigan Junior <sergiodj@redhat.com> To: GDB Patches <gdb-patches@sourceware.org> Cc: Pedro Alves <palves@redhat.com>, Sergio Durigan Junior <sergiodj@redhat.com> Subject: [RFA] Adjust gdb.arch/i386-sse-stack-align.exp print statement Date: Thu, 7 Dec 2017 18:30:15 -0500 Message-Id: <20171207233015.18656-1-sergiodj@redhat.com> In-Reply-To: <1499959929-29497-9-git-send-email-palves@redhat.com> References: <1499959929-29497-9-git-send-email-palves@redhat.com> X-IsSubscribed: yes |
Commit Message
Sergio Durigan Junior
Dec. 7, 2017, 11:30 p.m. UTC
Since: commit 46a4882b3c7d9ec981568b8b13a3c9c39c8f8e61 Author: Pedro Alves <palves@redhat.com> Date: Mon Sep 4 20:21:15 2017 +0100 Stop assuming no-debug-info variables have type int We now have to explicitly tell GDB the type of the non-debug-info variable we want to print (by casting). This commit adjusts the "print" statement on gdb.arch/i386-sse-stack-align.exp to do the proper cast, fixing a failure that started to happen after the mentioned commit. gdb/testsuite/ChangeLog: 2017-12-07 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.arch/i386-sse-stack-align.exp: Cast "print" variable to "int". --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.arch/i386-sse-stack-align.exp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
Comments
On 12/07/2017 11:30 PM, Sergio Durigan Junior wrote: > > commit 46a4882b3c7d9ec981568b8b13a3c9c39c8f8e61 > Author: Pedro Alves <palves@redhat.com> > Date: Mon Sep 4 20:21:15 2017 +0100 > > Stop assuming no-debug-info variables have type int > > We now have to explicitly tell GDB the type of the non-debug-info > variable we want to print (by casting). This commit adjusts the > "print" statement on gdb.arch/i386-sse-stack-align.exp to do the > proper cast, fixing a failure that started to happen after the > mentioned commit. > > gdb/testsuite/ChangeLog: > 2017-12-07 Sergio Durigan Junior <sergiodj@redhat.com> > > * gdb.arch/i386-sse-stack-align.exp: Cast "print" variable to > "int". This is OK, except... > --- > gdb/testsuite/ChangeLog | 5 +++++ > gdb/testsuite/gdb.arch/i386-sse-stack-align.exp | 2 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog > index 53f114aa15..81d23d1bb1 100644 > --- a/gdb/testsuite/ChangeLog > +++ b/gdb/testsuite/ChangeLog > @@ -1,3 +1,8 @@ > +2017-12-07 Sergio Durigan Junior <sergiodj@redhat.com> > + > + * gdb.arch/i386-sse-stack-align.exp: Cast "print" variable to > + "int". > + > 2017-12-07 Keith Seitz <keiths@redhat.com> > > * gdb.cp/nested-types.cc: New file. > diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp > index 47fb9f42d2..946f217ce1 100644 > --- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp > +++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp > @@ -43,7 +43,7 @@ if ![runto_main] then { > > set args "" > foreach i {0 1 2 3 4} { > - set test "print g$i ($args)" > + set test "print (int) g$i ($args)" ... this is printing/calling a function, not a variable: (gdb) print g0 () 'g0' has unknown return type; cast the call to its declared return type So the git log and ChangeLog are inaccurate and should reference 7022349d5c86 ("Stop assuming no-debug-info functions return int") instead. OK with that fixed. Thanks, Pedro Alves
On Friday, December 08 2017, Pedro Alves wrote: > On 12/07/2017 11:30 PM, Sergio Durigan Junior wrote: >> >> commit 46a4882b3c7d9ec981568b8b13a3c9c39c8f8e61 >> Author: Pedro Alves <palves@redhat.com> >> Date: Mon Sep 4 20:21:15 2017 +0100 >> >> Stop assuming no-debug-info variables have type int >> >> We now have to explicitly tell GDB the type of the non-debug-info >> variable we want to print (by casting). This commit adjusts the >> "print" statement on gdb.arch/i386-sse-stack-align.exp to do the >> proper cast, fixing a failure that started to happen after the >> mentioned commit. >> >> gdb/testsuite/ChangeLog: >> 2017-12-07 Sergio Durigan Junior <sergiodj@redhat.com> >> >> * gdb.arch/i386-sse-stack-align.exp: Cast "print" variable to >> "int". > > This is OK, except... > >> --- >> gdb/testsuite/ChangeLog | 5 +++++ >> gdb/testsuite/gdb.arch/i386-sse-stack-align.exp | 2 +- >> 2 files changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog >> index 53f114aa15..81d23d1bb1 100644 >> --- a/gdb/testsuite/ChangeLog >> +++ b/gdb/testsuite/ChangeLog >> @@ -1,3 +1,8 @@ >> +2017-12-07 Sergio Durigan Junior <sergiodj@redhat.com> >> + >> + * gdb.arch/i386-sse-stack-align.exp: Cast "print" variable to >> + "int". >> + >> 2017-12-07 Keith Seitz <keiths@redhat.com> >> >> * gdb.cp/nested-types.cc: New file. >> diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp >> index 47fb9f42d2..946f217ce1 100644 >> --- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp >> +++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp >> @@ -43,7 +43,7 @@ if ![runto_main] then { >> >> set args "" >> foreach i {0 1 2 3 4} { >> - set test "print g$i ($args)" >> + set test "print (int) g$i ($args)" > > ... this is printing/calling a function, not a variable: > > (gdb) print g0 () > 'g0' has unknown return type; cast the call to its declared return type > > So the git log and ChangeLog are inaccurate and should > reference 7022349d5c86 ("Stop assuming no-debug-info functions > return int") instead. > > OK with that fixed. Thanks for the catch, I adjusted the ChangeLog entry and the commit message accordingly. Pushed: 1cd9a73b4280cb133b305ee31a0e87f114bd1be8
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 53f114aa15..81d23d1bb1 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-12-07 Sergio Durigan Junior <sergiodj@redhat.com> + + * gdb.arch/i386-sse-stack-align.exp: Cast "print" variable to + "int". + 2017-12-07 Keith Seitz <keiths@redhat.com> * gdb.cp/nested-types.cc: New file. diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp index 47fb9f42d2..946f217ce1 100644 --- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp +++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp @@ -43,7 +43,7 @@ if ![runto_main] then { set args "" foreach i {0 1 2 3 4} { - set test "print g$i ($args)" + set test "print (int) g$i ($args)" gdb_test_multiple $test $test { -re " = 2\r\n$gdb_prompt $" { pass $test