From: Vidya Praveen <vidyapraveen@arm.com>
To: gdb-patches@sourceware.org
Cc: rearnsha@arm.com
Subject: [PATCH] Fix gdb.trace/entry-values.exp
Date: Mon, 30 Sep 2013 10:48:00 -0000 [thread overview]
Message-ID: <20130930104840.GC3460@e103625-lin.cambridge.arm.com> (raw)
[-- 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
}
next reply other threads:[~2013-09-30 10:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 10:48 Vidya Praveen [this message]
2013-09-30 11:54 ` Yao Qi
2013-09-30 12:44 ` Pedro Alves
2013-10-02 18:03 ` Vidya Praveen
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=20130930104840.GC3460@e103625-lin.cambridge.arm.com \
--to=vidyapraveen@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=rearnsha@arm.com \
/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