This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] gdb.trace: Surround $call_insn with \y in entry-values.exp


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7337a6f2297cdd91bb852b479b284e5796d62cc9

commit 7337a6f2297cdd91bb852b479b284e5796d62cc9
Author: Marcin KoÅ?cielnicki <koriakin@0x04.net>
Date:   Fri Feb 19 20:29:23 2016 +0100

    gdb.trace: Surround $call_insn with \y in entry-values.exp
    
    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',
    	change x86_64 call_insn to 'callq'.

Diff:
---
 gdb/testsuite/ChangeLog                  | 5 +++++
 gdb/testsuite/gdb.trace/entry-values.exp | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index f4ca9cc..ccd288a 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-25  Marcin KoÅ?cielnicki  <koriakin@0x04.net>
+
+	* gdb.trace/entry-values.exp: Surround $call_insn with '\y',
+	change x86_64 call_insn to 'callq'.
+
 2016-02-24  Antoine Tremblay  <antoine.tremblay@ericsson.com>
 
 	* gdb.trace/tfile-avx.c: Move to...
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
index 825928d..81b0263 100644
--- a/gdb/testsuite/gdb.trace/entry-values.exp
+++ b/gdb/testsuite/gdb.trace/entry-values.exp
@@ -57,6 +57,8 @@ if { [istarget "arm*-*-*"] || [istarget "aarch64*-*-*"] } {
     # returns.  The only exception is JALRC, in which case execution
     # resumes from `insn1' instead.
     set call_insn {jalrc|[jb]al[sxr]*[ \t][^\r\n]+\r\n}
+} elseif [is_amd64_regs_target] {
+    set call_insn "callq"
 } else {
     set call_insn "call"
 }
@@ -64,7 +66,7 @@ if { [istarget "arm*-*-*"] || [istarget "aarch64*-*-*"] } {
 # 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 $" {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]