Message ID | 1511280661-14725-2-git-send-email-palves@redhat.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 95971 invoked by alias); 21 Nov 2017 16:11:06 -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 95796 invoked by uid 89); 21 Nov 2017 16:11:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, 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:11:05 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F2FA06A7F2; Tue, 21 Nov 2017 16:11:03 +0000 (UTC) Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55B526C420; Tue, 21 Nov 2017 16:11:03 +0000 (UTC) From: Pedro Alves <palves@redhat.com> To: gdb-patches@sourceware.org, Joel Brobecker <brobecker@adacore.com> Subject: [PATCH 1/2] gdb.ada/minsyms.exp: Don't hardcode the variable's address Date: Tue, 21 Nov 2017 16:11:00 +0000 Message-Id: <1511280661-14725-2-git-send-email-palves@redhat.com> In-Reply-To: <1511280661-14725-1-git-send-email-palves@redhat.com> References: <1511280661-14725-1-git-send-email-palves@redhat.com> |
Commit Message
Pedro Alves
Nov. 21, 2017, 4:11 p.m. UTC
This new testcase has a test that fails like this here: $1 = (<data variable, no debug info> *) 0x60208c <some_minsym> (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. gdb/testsuite/ChangeLog: 2017-11-21 Pedro Alves <palves@redhat.com> * gdb.ada/minsyms.exp: Accept any address for 'some_minsym'. --- gdb/testsuite/gdb.ada/minsyms.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tuesday, November 21 2017, Pedro Alves wrote: > This new testcase has a test that fails like this here: > > $1 = (<data variable, no debug info> *) 0x60208c <some_minsym> > (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 <palves@redhat.com> > > * 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 <data variable, no debug info>\\) 0x62c2f8 <some_minsym>" > + " = \\(access <data variable, no debug info>\\) $hex <some_minsym>" > > gdb_test "print /x integer(&some_minsym)" \ > " = $hex" > -- > 2.5.5
> This new testcase has a test that fails like this here: > > $1 = (<data variable, no debug info> *) 0x60208c <some_minsym> > (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. > > gdb/testsuite/ChangeLog: > 2017-11-21 Pedro Alves <palves@redhat.com> > > * gdb.ada/minsyms.exp: Accept any address for 'some_minsym'. Gaaah. Head-slapping myself on that one. Thanks for fixing. Obviously OK :).
On 11/21/2017 04:50 PM, Joel Brobecker wrote: >> This new testcase has a test that fails like this here: >> >> $1 = (<data variable, no debug info> *) 0x60208c <some_minsym> >> (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. >> >> gdb/testsuite/ChangeLog: >> 2017-11-21 Pedro Alves <palves@redhat.com> >> >> * gdb.ada/minsyms.exp: Accept any address for 'some_minsym'. > > Gaaah. Head-slapping myself on that one. > > Thanks for fixing. Obviously OK :). :-) I pushed this one in, to get it out of the way. Thanks, Pedro Alves
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 <data variable, no debug info>\\) 0x62c2f8 <some_minsym>" + " = \\(access <data variable, no debug info>\\) $hex <some_minsym>" gdb_test "print /x integer(&some_minsym)" \ " = $hex"