Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@mips.com>
To: gdb-patches@sourceware.org
Cc: David Ung <davidu@mips.com>, Nigel Stephens <nigel@mips.com>,
	     "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: MDI: testsuite support
Date: Tue, 19 Feb 2008 16:27:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.61.0802191619220.13151@perivale.mips.com> (raw)

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


             reply	other threads:[~2008-02-19 16:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 16:27 Maciej W. Rozycki [this message]
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

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=Pine.LNX.4.61.0802191619220.13151@perivale.mips.com \
    --to=macro@mips.com \
    --cc=davidu@mips.com \
    --cc=gdb-patches@sourceware.org \
    --cc=macro@linux-mips.org \
    --cc=nigel@mips.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