From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28010 invoked by alias); 21 Nov 2017 16:24: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 27996 invoked by uid 89); 21 Nov 2017 16:24:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= 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; Tue, 21 Nov 2017 16:24:56 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC15568680; Tue, 21 Nov 2017 16:24:55 +0000 (UTC) Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3055160BE5; Tue, 21 Nov 2017 16:24:54 +0000 (UTC) From: Sergio Durigan Junior To: Pedro Alves Cc: gdb-patches@sourceware.org, Joel Brobecker Subject: Re: [PATCH 1/2] gdb.ada/minsyms.exp: Don't hardcode the variable's address References: <1511280661-14725-1-git-send-email-palves@redhat.com> <1511280661-14725-2-git-send-email-palves@redhat.com> Date: Tue, 21 Nov 2017 16:24:00 -0000 In-Reply-To: <1511280661-14725-2-git-send-email-palves@redhat.com> (Pedro Alves's message of "Tue, 21 Nov 2017 16:11:00 +0000") Message-ID: <8760a3oazu.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00441.txt.bz2 On Tuesday, November 21 2017, Pedro Alves wrote: > This new testcase has a test that fails like this here: > > $1 = ( *) 0x60208c > (gdb) FAIL: gdb.ada/minsyms.exp: print &some_minsym > > The problem is that the testcase hardcodes an expected address for the > "some_minsym" variable, which obviously isn't stable. > > Fix that by expecting $hex instead. No Ada expert here, but I'd say this is borderline obvious and should go in :-). Thanks, > gdb/testsuite/ChangeLog: > 2017-11-21 Pedro Alves > > * gdb.ada/minsyms.exp: Accept any address for 'some_minsym'. > --- > gdb/testsuite/gdb.ada/minsyms.exp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.ada/minsyms.exp b/gdb/testsuite/gdb.ada/minsyms.exp > index 2c91125..9878f9f 100644 > --- a/gdb/testsuite/gdb.ada/minsyms.exp > +++ b/gdb/testsuite/gdb.ada/minsyms.exp > @@ -35,7 +35,7 @@ gdb_test "print integer(some_minsym)" \ > " = 1234" > > gdb_test "print &some_minsym" \ > - " = \\(access \\) 0x62c2f8 " > + " = \\(access \\) $hex " > > gdb_test "print /x integer(&some_minsym)" \ > " = $hex" > -- > 2.5.5 -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/