This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
MDI: testsuite support
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: gdb-patches at sourceware dot org
- Cc: David Ung <davidu at mips dot com>, Nigel Stephens <nigel at mips dot com>, "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Tue, 19 Feb 2008 16:26:41 +0000 (GMT)
- Subject: MDI: testsuite support
Hello,
This is testsuite support for MDI targets. It makes them recognised as
remote and provides the necessary adjustments for the MI part.
2008-02-19 David Ung <davidu@mips.com>
Nigel Stephens <nigel@mips.com>
Maciej W. Rozycki <macro@mips.com>
* config/sde-mdi.exp: New file.
* lib/mi-support.exp (mi_gdb_target_cmd): Recognise MDI signon
message.
(mi_gdb_load): Add "mdi" gdb_protocol handler.
Maciej
mdi-12186.diff
Index: binutils-quilt/src/gdb/testsuite/lib/mi-support.exp
===================================================================
--- binutils-quilt.orig/src/gdb/testsuite/lib/mi-support.exp 2008-01-11 11:56:29.000000000 +0000
+++ binutils-quilt/src/gdb/testsuite/lib/mi-support.exp 2008-01-11 12:04:51.000000000 +0000
@@ -339,6 +339,10 @@
verbose "Set target to $targetname";
return 0;
}
+ -re "Remote MDI debugging.*$mi_gdb_prompt$" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
-re "Remote debugging using .*$serialport_re.*$mi_gdb_prompt$" {
verbose "Set target to $targetname";
return 0;
@@ -505,6 +509,27 @@
return -1
}
}
+ } elseif { [target_info gdb_protocol] == "mdi" } {
+ # MDI targets
+ send_gdb "47-target-select mdi [target_info gdb_serial]\n"
+ #send_gdb "target mdi [target_info gdb_serial]\n"
+ gdb_expect 60 {
+ -re "47\\^connected.*$mi_gdb_prompt$" {
+ }
+ timeout {
+ perror "Unable to select mdi target"
+ return -1
+ }
+ }
+ send_gdb "48-target-download\n"
+ gdb_expect 10 {
+ -re "48\\^done.*$mi_gdb_prompt$" {
+ }
+ timeout {
+ perror "Unable to download to mdi target"
+ return -1
+ }
+ }
} elseif { [target_info gdb_protocol] == "remote" } {
# remote targets
if { [mi_gdb_target_cmd "remote" [target_info netport]] != 0 } {
Index: binutils-quilt/src/gdb/testsuite/config/sde-mdi.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ binutils-quilt/src/gdb/testsuite/config/sde-mdi.exp 2008-01-11 12:08:40.000000000 +0000
@@ -0,0 +1,16 @@
+# Copyright 1993, 1997, 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp