From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1919 invoked by alias); 30 Aug 2013 15:29:32 -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 1906 invoked by uid 89); 30 Aug 2013 15:29:32 -0000 Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Aug 2013 15:29:32 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 30 Aug 2013 16:29:29 +0100 Received: from e103625-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 30 Aug 2013 16:29:28 +0100 Date: Fri, 30 Aug 2013 15:29:00 -0000 From: Vidya Praveen To: Yao Qi Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH 1/2] Test case for entry values. Message-ID: <20130830152927.GC9666@e103625-lin.cambridge.arm.com> References: <1376379586-24150-1-git-send-email-yao@codesourcery.com> <1376379586-24150-2-git-send-email-yao@codesourcery.com> <5220B1B6.2000304@arm.com> MIME-Version: 1.0 In-Reply-To: <5220B1B6.2000304@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-MC-Unique: 113083016292900601 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-SW-Source: 2013-08/txt/msg00923.txt.bz2 On Fri, Aug 30, 2013 at 03:52:38PM +0100, Vidya Praveen wrote: > Hi Yao Qi, >=20 > On 08/13/13 08:39, Yao Qi wrote: > [...] > > +set bar_length "" > > +set bar_call_foo "" > > + > > +# Calculate the offset of the last instruction from the beginning. > > +set test "disassemble bar" > > +gdb_test_multiple $test $test { > > + -re ".*$hex <\\+$decimal>:\[ \t\]+call\[^\r\n\]+\r\n\[ \]+$hex <\\= +($decimal)>:" { >=20 > If I understand it right, this expects a 'call' instruction. Isn't this t= arget > specific? Sorry I missed this comment: +if [string equal $bar_call_foo ""] { + fail "Find the call or branch instruction offset in bar" + # The following test makes no sense if the offset is unknown. We need + # to update the pattern above to match call or branch instruction for + # the target architecture. + return -1 +} This test fails for ARM targets as they generate 'bl'. Regards=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 VP =20=20=20=20=20=20=20=20