From: Michael Snyder <msnyder@vmware.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [RFA] reverse debugging tests
Date: Fri, 11 Sep 2009 20:49:00 -0000 [thread overview]
Message-ID: <4AAAB750.8000209@vmware.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]
Note, I've only done one of the several tests here --
if this change is approved, I'll change the others the same way.
This patch is to make the reverse debugging tests auto-detect
the targets that they can run on, to eliminate the need for
using a board description file to run them.
It's tricky, because we have to detect several different kinds
of targets:
1) Native Linux, which can be detected early, and
2) Remote targets that answer the qSupported probe appropriately,
which can't be tested until after gdb connects to the target.
So I've made two changes:
1) In place of "if ![target_info exists gdb,can_reverse]"
substitute
+if [istarget "*linux*"] then {
+ if { ![istarget "i?86-*linux*"] && ![istarget "amd64-*linux*"] } then {
+ # test process record on i?86 and amd64 linux
+ return;
+ }
+}
and
2) After "runto main", this substitution:
-if [target_info exists gdb,use_precord] {
- # Activate process record/replay
- gdb_test "record" "" "Turn on process record"
- # FIXME: command ought to acknowledge, so we can test if it succeeded.
+if ![target_info exists use_gdb_stub] then {
+ if { [istarget "i?86-*linux*"] || [istarget "amd64-*linux*"] } then {
+ # Activate process record/replay
+ gdb_test "record" "" "Turn on process record"
+ # FIXME: command ought to acknowledge, so we can test if it
succeeded.
+ }
+}
+
+if [target_info exists use_gdb_stub] then {
+ send_gdb "show remote reverse-continue\n"
+ gdb_expect {
+ -re ".* currently enabled.*$gdb_prompt " {
+ }
+ -re ".*$gdb_prompt " {
+ return
+ }
+ }
}
[-- Attachment #2: reversetests.txt --]
[-- Type: text/plain, Size: 1614 bytes --]
2009-09-11 Michael Snyder <msnyder@vmware.com>
* gdb.reverse/step-reverse.exp: Explicitly check for targets
that can support reverse debuggnig.
Index: step-reverse.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.reverse/step-reverse.exp,v
retrieving revision 1.2
diff -u -p -r1.2 step-reverse.exp
--- step-reverse.exp 14 Jul 2009 20:17:26 -0000 1.2
+++ step-reverse.exp 11 Sep 2009 19:14:19 -0000
@@ -20,8 +20,11 @@
# Test step and next in reverse
#
-if ![target_info exists gdb,can_reverse] {
- return
+if [istarget "*linux*"] then {
+ if { ![istarget "i?86-*linux*"] && ![istarget "amd64-*linux*"] } then {
+ # test process record on i?86 and amd64 linux
+ return;
+ }
}
set testfile "step-reverse"
@@ -33,10 +36,23 @@ if { [prepare_for_testing $testfile.exp
runto main
-if [target_info exists gdb,use_precord] {
- # Activate process record/replay
- gdb_test "record" "" "Turn on process record"
- # FIXME: command ought to acknowledge, so we can test if it succeeded.
+if ![target_info exists use_gdb_stub] then {
+ if { [istarget "i?86-*linux*"] || [istarget "amd64-*linux*"] } then {
+ # Activate process record/replay
+ gdb_test "record" "" "Turn on process record"
+ # FIXME: command ought to acknowledge, so we can test if it succeeded.
+ }
+}
+
+if [target_info exists use_gdb_stub] then {
+ send_gdb "show remote reverse-continue\n"
+ gdb_expect {
+ -re ".* currently enabled.*$gdb_prompt " {
+ }
+ -re ".*$gdb_prompt " {
+ return
+ }
+ }
}
# plain vanilla step/next (no count)
next reply other threads:[~2009-09-11 20:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 20:49 Michael Snyder [this message]
2009-09-11 22:29 ` Tom Tromey
2009-09-15 0:23 ` Hui Zhu
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=4AAAB750.8000209@vmware.com \
--to=msnyder@vmware.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