From: "Marcin Kościelnicki" <koriakin@0x04.net>
To: gdb-patches@sourceware.org
Cc: antoine.tremblay@ericsson.com, "Marcin Kościelnicki" <koriakin@0x04.net>
Subject: [PATCH 2/3] gdb.trace: Surround $call_insn with \y in entry-values.exp
Date: Sat, 20 Feb 2016 14:02:00 -0000 [thread overview]
Message-ID: <1455976932-22255-2-git-send-email-koriakin@0x04.net> (raw)
In-Reply-To: <1455976932-22255-1-git-send-email-koriakin@0x04.net>
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 <koriakin@0x04.net>
+ * 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 <koriakin@0x04.net>
+
* 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
--
2.7.1
next prev parent reply other threads:[~2016-02-20 14:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 12:23 [PATCH] gdb.trace: Move more target dependencies to trace-support.exp Marcin Kościelnicki
2016-02-19 15:05 ` Antoine Tremblay
2016-02-19 15:18 ` Marcin Kościelnicki
2016-02-20 14:02 ` [PATCH 1/3] " Marcin Kościelnicki
2016-02-20 14:02 ` [PATCH 3/3] gdb.trace: Remove unnecessary target check from ftrace.exp Marcin Kościelnicki
2016-02-25 14:22 ` Pedro Alves
2016-02-25 15:12 ` Marcin Kościelnicki
2016-02-20 14:02 ` Marcin Kościelnicki [this message]
2016-02-25 14:19 ` [PATCH 2/3] gdb.trace: Surround $call_insn with \y in entry-values.exp Pedro Alves
2016-02-25 15:12 ` Marcin Kościelnicki
2016-02-25 13:45 ` [PATCH] gdb.trace: Move more target dependencies to trace-support.exp Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455976932-22255-2-git-send-email-koriakin@0x04.net \
--to=koriakin@0x04.net \
--cc=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox