From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13561 invoked by alias); 30 Sep 2013 10:48:46 -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 13546 invoked by uid 89); 30 Sep 2013 10:48:45 -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; Mon, 30 Sep 2013 10:48:45 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,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; Mon, 30 Sep 2013 11:48:42 +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); Mon, 30 Sep 2013 11:48:41 +0100 Date: Mon, 30 Sep 2013 10:48:00 -0000 From: Vidya Praveen To: gdb-patches@sourceware.org Cc: rearnsha@arm.com Subject: [PATCH] Fix gdb.trace/entry-values.exp Message-ID: <20130930104840.GC3460@e103625-lin.cambridge.arm.com> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2010-09-15) X-MC-Unique: 113093011484203001 Content-Type: multipart/mixed; boundary="IrhDeMKUP4DT/M7F" Content-Disposition: inline X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg01006.txt.bz2 --IrhDeMKUP4DT/M7F Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-length: 607 Hello Test gdb.trace/entry-values.exp scans for 'call' instruction in the disasse= mbly of entry-values.c's object file, causing it to FAIL for targets whose call instruction is not 'call'. This patch fixes this for ARM targets by using the right call instruction b= ased on the target. However, the second part of the test would eventually end as UNSUPPORTED for ARM targets as it tests gdb trace. OK? Regards VP ~~~ 2013-09-30 Vidya Praveen * testsuite/gdb.trace/entry-values.exp: Modify regular expression to scan for 'bl' instruction instead of 'call' for ARM targets. --IrhDeMKUP4DT/M7F Content-Type: text/x-diff; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fix-v6.patch" Content-length: 824 diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.t= race/entry-values.exp index 85306ad..b36a4e4 100644 --- a/gdb/testsuite/gdb.trace/entry-values.exp +++ b/gdb/testsuite/gdb.trace/entry-values.exp @@ -75,10 +75,16 @@ gdb_test_multiple $test $test { set bar_length "" set bar_call_foo "" =20 +if { [istarget "arm*-*-*"] || [istarget "aarch64*-*-*"] } { + set call_insn "bl" +} else { + set call_insn "call" +} + # 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 <\\+($d= ecimal)>:" { + -re ".*$hex <\\+$decimal>:\[ \t\]+$call_insn\[^\r\n\]+\r\n\[ \]+$hex <= \\+($decimal)>:" { set bar_call_foo $expect_out(1,string) exp_continue }= --IrhDeMKUP4DT/M7F--