Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix gdb.trace/entry-values.exp
@ 2013-09-30 10:48 Vidya Praveen
  2013-09-30 11:54 ` Yao Qi
  2013-09-30 12:44 ` Pedro Alves
  0 siblings, 2 replies; 4+ messages in thread
From: Vidya Praveen @ 2013-09-30 10:48 UTC (permalink / raw)
  To: gdb-patches; +Cc: rearnsha

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]

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.

[-- Attachment #2: fix-v6.patch --]
[-- Type: text/x-diff, Size: 835 bytes --]

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
     }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-02 18:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-30 10:48 [PATCH] Fix gdb.trace/entry-values.exp Vidya Praveen
2013-09-30 11:54 ` Yao Qi
2013-09-30 12:44 ` Pedro Alves
2013-10-02 18:03   ` Vidya Praveen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox