Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* MDI: testsuite support
@ 2008-02-19 16:27 Maciej W. Rozycki
  2008-02-26 16:24 ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: Maciej W. Rozycki @ 2008-02-19 16:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: David Ung, Nigel Stephens, Maciej W. Rozycki

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


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

end of thread, other threads:[~2008-02-27 15:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-19 16:27 MDI: testsuite support Maciej W. Rozycki
2008-02-26 16:24 ` Daniel Jacobowitz
2008-02-26 16:47   ` Maciej W. Rozycki
2008-02-26 16:58     ` Daniel Jacobowitz
2008-02-26 17:06       ` Maciej W. Rozycki
2008-02-26 17:10         ` Daniel Jacobowitz
2008-02-26 17:18           ` Maciej W. Rozycki
2008-02-26 17:28             ` Daniel Jacobowitz
2008-02-26 19:07               ` Maciej W. Rozycki
2008-02-27 15:49       ` Maciej W. Rozycki
2008-02-27 15:53         ` Daniel Jacobowitz

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