Message ID | 1429639711-16459-9-git-send-email-palves@redhat.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 115256 invoked by alias); 21 Apr 2015 18:15:37 -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 115230 invoked by uid 89); 21 Apr 2015 18:15:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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; Tue, 21 Apr 2015 18:15:35 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id DF7B78E924 for <gdb-patches@sourceware.org>; Tue, 21 Apr 2015 18:08:41 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3LI8WKv028722 for <gdb-patches@sourceware.org>; Tue, 21 Apr 2015 14:08:41 -0400 From: Pedro Alves <palves@redhat.com> To: gdb-patches@sourceware.org Subject: [PATCH 08/24] Make gdb.base/sizeof.exp use gdb_test_stdio Date: Tue, 21 Apr 2015 19:08:15 +0100 Message-Id: <1429639711-16459-9-git-send-email-palves@redhat.com> In-Reply-To: <1429639711-16459-1-git-send-email-palves@redhat.com> References: <1429639711-16459-1-git-send-email-palves@redhat.com> |
Commit Message
Pedro Alves
April 21, 2015, 6:08 p.m. UTC
gdb/testsuite/ChangeLog: 2015-04-21 Pedro Alves <palves@redhat.com> * gdb.base/sizeof.exp (check_sizeof, check_valueof): Use gdb_test_stdio. --- gdb/testsuite/gdb.base/sizeof.exp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
Comments
On 04/21/2015 02:08 PM, Pedro Alves wrote: > gdb/testsuite/ChangeLog: > 2015-04-21 Pedro Alves <palves@redhat.com> > > * gdb.base/sizeof.exp (check_sizeof, check_valueof): Use > gdb_test_stdio. > --- > gdb/testsuite/gdb.base/sizeof.exp | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/sizeof.exp b/gdb/testsuite/gdb.base/sizeof.exp > index 7fda76e..a237ee3 100644 > --- a/gdb/testsuite/gdb.base/sizeof.exp > +++ b/gdb/testsuite/gdb.base/sizeof.exp > @@ -70,8 +70,10 @@ set sizeof_long_double [get_sizeof "long double" 8] > proc check_sizeof { type size } { > global gdb_prompt > > - set pat [string_to_regexp "sizeof (${type}) == ${size}"] > - gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check sizeof \"$type\"" > + set pat [string_to_regexp "sizeof (${type}) == ${size}\r\n"] > + gdb_test_stdio "next" "${pat}" \ > + "\[0-9\].*" \ > + "check sizeof \"$type\"" > } > > check_sizeof "char" ${sizeof_char} > @@ -90,8 +92,10 @@ check_sizeof "long double" ${sizeof_long_double} > proc check_valueof { exp val } { > global gdb_prompt > > - set pat [string_to_regexp "valueof (${exp}) == ${val}"] > - gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check valueof \"$exp\"" > + set pat [string_to_regexp "valueof (${exp}) == ${val}\r\n"] > + gdb_test_stdio "next" "${pat}" \ > + "\[0-9\].*" \ > + "check valueof \"$exp\"" > } > > # Check that GDB and the target agree over the sign of a character. > It's not part of the patch but should we replace : # Test depends on printf, which the sparclet stub doesn't support. if { [istarget "sparclet-*-*"] } { return 0 } With :if [target_info exists gdb,noinferiorio] { ? This is present in other tests too... Thanks, Antoine And add that option to the sparclet target ? ( I could not find that target in the tree even if config/m32r-stub.exp references it...
On 04/23/2015 11:36 AM, Antoine Tremblay wrote: > > > On 04/21/2015 02:08 PM, Pedro Alves wrote: >> gdb/testsuite/ChangeLog: >> 2015-04-21 Pedro Alves <palves@redhat.com> >> >> * gdb.base/sizeof.exp (check_sizeof, check_valueof): Use >> gdb_test_stdio. >> --- >> gdb/testsuite/gdb.base/sizeof.exp | 12 ++++++++---- >> 1 file changed, 8 insertions(+), 4 deletions(-) >> >> diff --git a/gdb/testsuite/gdb.base/sizeof.exp >> b/gdb/testsuite/gdb.base/sizeof.exp >> index 7fda76e..a237ee3 100644 >> --- a/gdb/testsuite/gdb.base/sizeof.exp >> +++ b/gdb/testsuite/gdb.base/sizeof.exp >> @@ -70,8 +70,10 @@ set sizeof_long_double [get_sizeof "long double" 8] >> proc check_sizeof { type size } { >> global gdb_prompt >> >> - set pat [string_to_regexp "sizeof (${type}) == ${size}"] >> - gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check sizeof \"$type\"" >> + set pat [string_to_regexp "sizeof (${type}) == ${size}\r\n"] >> + gdb_test_stdio "next" "${pat}" \ >> + "\[0-9\].*" \ >> + "check sizeof \"$type\"" >> } >> >> check_sizeof "char" ${sizeof_char} >> @@ -90,8 +92,10 @@ check_sizeof "long double" ${sizeof_long_double} >> proc check_valueof { exp val } { >> global gdb_prompt >> >> - set pat [string_to_regexp "valueof (${exp}) == ${val}"] >> - gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check valueof \"$exp\"" >> + set pat [string_to_regexp "valueof (${exp}) == ${val}\r\n"] >> + gdb_test_stdio "next" "${pat}" \ >> + "\[0-9\].*" \ >> + "check valueof \"$exp\"" >> } >> >> # Check that GDB and the target agree over the sign of a character. >> > > It's not part of the patch but should we replace : > > # Test depends on printf, which the sparclet stub doesn't support. > if { [istarget "sparclet-*-*"] } { > return 0 > } > > With :if [target_info exists gdb,noinferiorio] { ? > > This is present in other tests too... > > Thanks, > Antoine > > > And add that option to the sparclet target ? ( I could not find that > target in the tree even if config/m32r-stub.exp references it... > Oops I've hit send by mistake this was meant for [PATCH 09/24] Make gdb.base/call-strs.exp use gdb_test_stdio and others like it... Sorry about that Antoine
On 04/23/2015 04:38 PM, Antoine Tremblay wrote: >> It's not part of the patch but should we replace : >> >> # Test depends on printf, which the sparclet stub doesn't support. >> if { [istarget "sparclet-*-*"] } { >> return 0 >> } >> >> With :if [target_info exists gdb,noinferiorio] { ? >> Yes, though... >> This is present in other tests too... >> >> Thanks, >> Antoine >> >> >> And add that option to the sparclet target ? ( I could not find that >> target in the tree even if config/m32r-stub.exp references it... ... I had never heard of sparclet before, until I noticed that line too. I had assumed it was a Sun SPARC cpu variant, and ignored it. But now I notice that it's something else. We still have a chapter about it in the manual: https://sourceware.org/gdb/onlinedocs/gdb/Sparclet.html But, NEWS says the support was removed in gdb 6.1... * REMOVED configurations and files ... Tsqware Sparclet sparclet-*-* ... ChangeLog-2003 has: ... * sparclet-stub.c, sparclet-rom.c: Delete obsolete file. ... etc. So the remaining bits are just waiting for someone to garbage collect them. >> > > Oops I've hit send by mistake this was meant for [PATCH 09/24] Make > gdb.base/call-strs.exp use gdb_test_stdio and others like it... > > Sorry about that > No worries. :-) Thanks, Pedro Alves
On 04/23/2015 04:49 PM, Pedro Alves wrote: > On 04/23/2015 04:38 PM, Antoine Tremblay wrote: > >>> It's not part of the patch but should we replace : >>> >>> # Test depends on printf, which the sparclet stub doesn't support. >>> if { [istarget "sparclet-*-*"] } { >>> return 0 >>> } >>> >>> With :if [target_info exists gdb,noinferiorio] { ? >>> > > Yes, though... TBC, the tests in question already check gdb_skip_stdio_test, so adding a gdb,noinferiorio check would not be necessary. (But yes to the rest.) Thanks, Pedro Alves
On 04/23/2015 12:04 PM, Pedro Alves wrote: > On 04/23/2015 04:49 PM, Pedro Alves wrote: >> On 04/23/2015 04:38 PM, Antoine Tremblay wrote: >> >>>> It's not part of the patch but should we replace : >>>> >>>> # Test depends on printf, which the sparclet stub doesn't support. >>>> if { [istarget "sparclet-*-*"] } { >>>> return 0 >>>> } >>>> >>>> With :if [target_info exists gdb,noinferiorio] { ? >>>> >> >> Yes, though... > > TBC, the tests in question already check gdb_skip_stdio_test, > so adding a gdb,noinferiorio check would not be necessary. > Indeed, the whole test doesn't always need to be skipped.. Thanks! Antoine
diff --git a/gdb/testsuite/gdb.base/sizeof.exp b/gdb/testsuite/gdb.base/sizeof.exp index 7fda76e..a237ee3 100644 --- a/gdb/testsuite/gdb.base/sizeof.exp +++ b/gdb/testsuite/gdb.base/sizeof.exp @@ -70,8 +70,10 @@ set sizeof_long_double [get_sizeof "long double" 8] proc check_sizeof { type size } { global gdb_prompt - set pat [string_to_regexp "sizeof (${type}) == ${size}"] - gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check sizeof \"$type\"" + set pat [string_to_regexp "sizeof (${type}) == ${size}\r\n"] + gdb_test_stdio "next" "${pat}" \ + "\[0-9\].*" \ + "check sizeof \"$type\"" } check_sizeof "char" ${sizeof_char} @@ -90,8 +92,10 @@ check_sizeof "long double" ${sizeof_long_double} proc check_valueof { exp val } { global gdb_prompt - set pat [string_to_regexp "valueof (${exp}) == ${val}"] - gdb_test "next" "${pat}\[\r\n\]+\[0-9\].*" "check valueof \"$exp\"" + set pat [string_to_regexp "valueof (${exp}) == ${val}\r\n"] + gdb_test_stdio "next" "${pat}" \ + "\[0-9\].*" \ + "check valueof \"$exp\"" } # Check that GDB and the target agree over the sign of a character.