From: Mark Salter <msalter@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: mi test fix for remote targets
Date: Fri, 17 Jan 2003 21:29:00 -0000 [thread overview]
Message-ID: <20030117212941.E16EC7884D@deneb.localdomain> (raw)
I used the following tweak to get the mi tests to run on a
remote target (RedBoot).
--Mark
2003-01-17 Mark Salter <msalter@redhat.com>
* lib/mi-support.exp (mi_gdb_load): Support remote targets.
Support empty arg.
Index: testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.20
diff -u -p -5 -r1.20 mi-support.exp
--- testsuite/lib/mi-support.exp 16 Dec 2002 20:03:17 -0000 1.20
+++ testsuite/lib/mi-support.exp 17 Jan 2003 21:24:54 -0000
@@ -289,12 +289,19 @@ proc mi_gdb_load { arg } {
global verbose
global loadpath
global loadfile
global GDB
global mi_gdb_prompt
+ global last_mi_gdb_file
upvar timeout timeout
+ if { $arg == "" } {
+ set arg $last_mi_gdb_file;
+ }
+
+ set last_mi_gdb_file $arg;
+
# ``gdb_unload''
# ``gdb_file_cmd''
# FIXME: Several of these patterns are only acceptable for console
# output. Queries are an error for mi.
@@ -383,10 +390,30 @@ proc mi_gdb_load { arg } {
gdb_expect 10 {
-re "48\\^done.*$mi_gdb_prompt$" {
}
timeout {
perror "Unable to download to sim target"
+ return -1
+ }
+ }
+ } elseif { [target_info gdb_protocol] == "remote" } {
+ # remote targets
+ send_gdb "target [target_info gdb_protocol] [target_info netport]\n"
+ gdb_expect 60 {
+ -re "\\^done,.*$mi_gdb_prompt$" {
+ }
+ timeout {
+ perror "Unable to connect to remote target"
+ return -1
+ }
+ }
+ send_gdb "48-target-download\n"
+ gdb_expect 10 {
+ -re "48\\^done.*$mi_gdb_prompt$" {
+ }
+ timeout {
+ perror "Unable to download to remote target"
return -1
}
}
}
return 0
next reply other threads:[~2003-01-17 21:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-17 21:29 Mark Salter [this message]
2003-01-17 22:04 ` Daniel Jacobowitz
2003-01-31 5:47 ` Andrew Cagney
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=20030117212941.E16EC7884D@deneb.localdomain \
--to=msalter@redhat.com \
--cc=gdb-patches@sources.redhat.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