From patchwork Sat Feb 20 14:02:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marcin_Ko=C5=9Bcielnicki?= X-Patchwork-Id: 10966 Received: (qmail 45939 invoked by alias); 20 Feb 2016 14:02:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 44838 invoked by uid 89); 20 Feb 2016 14:02:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 20 Feb 2016 14:02:16 +0000 Received: from hogfather.0x04.net (89-65-66-135.dynamic.chello.pl [89.65.66.135]) by xyzzy.0x04.net (Postfix) with ESMTPS id D78614107D; Sat, 20 Feb 2016 15:03:06 +0100 (CET) Received: by hogfather.0x04.net (Postfix, from userid 1000) id E12BB58010A; Sat, 20 Feb 2016 15:02:13 +0100 (CET) From: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= To: gdb-patches@sourceware.org Cc: antoine.tremblay@ericsson.com, =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= Subject: [PATCH 2/3] gdb.trace: Surround $call_insn with \y in entry-values.exp Date: Sat, 20 Feb 2016 15:02:11 +0100 Message-Id: <1455976932-22255-2-git-send-email-koriakin@0x04.net> In-Reply-To: <1455976932-22255-1-git-send-email-koriakin@0x04.net> References: <56C7323C.4050707@0x04.net> <1455976932-22255-1-git-send-email-koriakin@0x04.net> MIME-Version: 1.0 X-IsSubscribed: yes The PPC64 tracepoint patch added \y at the end of the call_insn pattern - without that, it embarassed itself and matched the 'bl' in "Dump of assem*bl*er code for function" as the powerpc call opcode. Since that sounds like a generally good idea, I've added \y before and after call_insn for every target. As a result, I had to change x86_64's mnemonic to 'callq'. gdb/testsuite/ChangeLog: * gdb.trace/entry-values.exp: Surround $call_insn with '\y'. * lib/trace-support.exp: Change x86_64 call_insn to 'callq'. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.trace/entry-values.exp | 2 +- gdb/testsuite/lib/trace-support.exp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ec2773b..4546cc7 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2016-02-19 Marcin Kościelnicki + * gdb.trace/entry-values.exp: Surround $call_insn with '\y'. + * lib/trace-support.exp: Change x86_64 call_insn to 'callq'. + +2016-02-19 Marcin Kościelnicki + * gdb.trace/entry-values.exp: Move call_insn setting to trace-support.exp. * gdb.trace/ftrace.exp: Move arg0exp setting to trace-support.exp. diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp index 75c788a..2890112 100644 --- a/gdb/testsuite/gdb.trace/entry-values.exp +++ b/gdb/testsuite/gdb.trace/entry-values.exp @@ -42,7 +42,7 @@ set returned_from_foo "" # Calculate the offset of the instruction in bar returned from foo. set test "disassemble bar" gdb_test_multiple $test $test { - -re ".*$hex <\\+$decimal>:\[ \t\]+$call_insn\[^\r\n\]+\r\n\[ \]+$hex <\\+($decimal)>:.*$gdb_prompt $" { + -re ".*$hex <\\+$decimal>:\[ \t\]+\\y$call_insn\\y\[^\r\n\]+\r\n\[ \]+$hex <\\+($decimal)>:.*$gdb_prompt $" { set returned_from_foo $expect_out(1,string) } -re ".*$gdb_prompt $" { diff --git a/gdb/testsuite/lib/trace-support.exp b/gdb/testsuite/lib/trace-support.exp index 0565030..96f2c35 100644 --- a/gdb/testsuite/lib/trace-support.exp +++ b/gdb/testsuite/lib/trace-support.exp @@ -35,7 +35,7 @@ if [is_amd64_regs_target] { # register usage in tracepoint conditions. set arg0exp "\$rdi" # The mnemonic of the usual, unconditional call instruction. - set call_insn "call" + set call_insn "callq" # Number of the PC register. set pcnum 16 # Number of any GPR (it's supposed to be some register that's not