This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix gdb.trace/entry-values.exp
- From: Vidya Praveen <vidyapraveen at arm dot com>
- To: gdb-patches at sourceware dot org
- Cc: rearnsha at arm dot com
- Date: Mon, 30 Sep 2013 11:48:41 +0100
- Subject: [PATCH] Fix gdb.trace/entry-values.exp
- Authentication-results: sourceware.org; auth=none
Hello
Test gdb.trace/entry-values.exp scans for 'call' instruction in the disassembly
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 based
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 <vidyapraveen@arm.com>
* testsuite/gdb.trace/entry-values.exp: Modify regular expression to
scan for 'bl' instruction instead of 'call' for ARM targets.
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/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 ""
+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 <\\+($decimal)>:" {
+ -re ".*$hex <\\+$decimal>:\[ \t\]+$call_insn\[^\r\n\]+\r\n\[ \]+$hex <\\+($decimal)>:" {
set bar_call_foo $expect_out(1,string)
exp_continue
}