From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123121 invoked by alias); 5 Jan 2018 17:01:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 123105 invoked by uid 89); 5 Jan 2018 17:01:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=HTo:U*tom 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; Fri, 05 Jan 2018 17:01:56 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 740B661E53; Fri, 5 Jan 2018 17:02:10 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E4BB6A045; Fri, 5 Jan 2018 17:01:54 +0000 (UTC) Subject: Re: [RFA] Fix scm-ports.exp regression To: Tom Tromey , gdb-patches@sourceware.org References: <20180103182048.8495-1-tom@tromey.com> From: Pedro Alves Message-ID: <37ddb96c-2b32-2fcd-9c36-17f32d8701e3@redhat.com> Date: Fri, 05 Jan 2018 17:01:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180103182048.8495-1-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-01/txt/msg00102.txt.bz2 On 01/03/2018 06:20 PM, Tom Tromey wrote: > In https://sourceware.org/ml/gdb-patches/2017-12/msg00215.html, Jan > pointed out that the scalar printing patches caused a regression in > scm-ports.exp on x86. > > I think the simplest fix is to use "print/u" rather than "print/d" to > get the value of sp_reg in the test case. Can you expand a bit on this rationale, please? There's: (parse-and-eval \"*(char*) \$sp\") in the context of the diff. Is that related? I ask because that "char" in there would look like something that could print as signed or unsigned depending on target. It'll probably be obvious with a bit more info. Thanks, Pedro Alves > > Tested on x86-64 Fedora 26 using an ordinary build and also a -m32 > build. > > 2018-01-03 Tom Tromey > > * gdb.guile/scm-ports.exp (test_mem_port_rw): Use get_valueof to > compute sp_reg. > --- > gdb/testsuite/ChangeLog | 5 +++++ > gdb/testsuite/gdb.guile/scm-ports.exp | 2 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog > index 500dbddf1c..e3903cca6b 100644 > --- a/gdb/testsuite/ChangeLog > +++ b/gdb/testsuite/ChangeLog > @@ -1,3 +1,8 @@ > +2018-01-03 Tom Tromey > + > + * gdb.guile/scm-ports.exp (test_mem_port_rw): Use get_valueof to > + compute sp_reg. > + > 2018-01-03 Xavier Roirand > > * gdb.ada/excep_handle.exp: New testcase. > diff --git a/gdb/testsuite/gdb.guile/scm-ports.exp b/gdb/testsuite/gdb.guile/scm-ports.exp > index 48af5e30e1..04170ef4b8 100644 > --- a/gdb/testsuite/gdb.guile/scm-ports.exp > +++ b/gdb/testsuite/gdb.guile/scm-ports.exp > @@ -104,7 +104,7 @@ proc test_mem_port_rw { kind } { > "get sp reg" > # Note: Only use $sp_reg for gdb_test result matching, don't use it in > # gdb commands. Otherwise transcript.N becomes unusable. > - set sp_reg [get_integer_valueof "\$sp" 0] > + set sp_reg [get_valueof /u "\$sp" 0] > gdb_test_no_output "guile (define byte-at-sp (parse-and-eval \"*(char*) \$sp\"))" \ > "save current value at sp" > # Pass the result of parse-and-eval through value-fetch-lazy!, >