From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16178 invoked by alias); 17 Jan 2003 21:29:46 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16170 invoked from network); 17 Jan 2003 21:29:43 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 17 Jan 2003 21:29:43 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h0HL1DB16040 for ; Fri, 17 Jan 2003 16:01:13 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h0HLTha13492 for ; Fri, 17 Jan 2003 16:29:43 -0500 Received: from deneb.localdomain (msalter.cipe.redhat.com [10.0.0.36]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h0HLTgI25178 for ; Fri, 17 Jan 2003 16:29:42 -0500 Received: by deneb.localdomain (Postfix, from userid 500) id E16EC7884D; Fri, 17 Jan 2003 16:29:41 -0500 (EST) From: Mark Salter To: gdb-patches@sources.redhat.com Subject: mi test fix for remote targets Message-Id: <20030117212941.E16EC7884D@deneb.localdomain> Date: Fri, 17 Jan 2003 21:29:00 -0000 X-SW-Source: 2003-01/txt/msg00658.txt.bz2 I used the following tweak to get the mi tests to run on a remote target (RedBoot). --Mark 2003-01-17 Mark Salter * 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