From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20193 invoked by alias); 19 Feb 2008 16:27:17 -0000 Received: (qmail 20183 invoked by uid 22791); 19 Feb 2008 16:27:16 -0000 X-Spam-Check-By: sourceware.org Received: from dmz.mips-uk.com (HELO dmz.mips-uk.com) (194.74.144.194) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Feb 2008 16:26:49 +0000 Received: from internal-mx1 ([192.168.192.240] helo=ukservices1.mips.com) by dmz.mips-uk.com with esmtp (Exim 3.35 #1 (Debian)) id 1JRVIs-0003ab-00; Tue, 19 Feb 2008 16:26:46 +0000 Received: from perivale.mips.com ([192.168.192.200]) by ukservices1.mips.com with esmtp (Exim 3.36 #1 (Debian)) id 1JRVIo-0007Vk-00; Tue, 19 Feb 2008 16:26:42 +0000 Received: from macro (helo=localhost) by perivale.mips.com with local-esmtp (Exim 4.63) (envelope-from ) id 1JRVIn-0007C7-W8; Tue, 19 Feb 2008 16:26:42 +0000 Date: Tue, 19 Feb 2008 16:27:00 -0000 From: "Maciej W. Rozycki" To: gdb-patches@sourceware.org cc: David Ung , Nigel Stephens , "Maciej W. Rozycki" Subject: MDI: testsuite support Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MIPS-Technologies-UK-MailScanner: Found to be clean X-MIPS-Technologies-UK-MailScanner-From: macro@mips.com Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00314.txt.bz2 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 Nigel Stephens Maciej W. Rozycki * 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 . + +load_lib ../config/monitor.exp