From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9345 invoked by alias); 20 Jul 2007 21:18:10 -0000 Received: (qmail 9337 invoked by uid 22791); 20 Jul 2007 21:18:09 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 20 Jul 2007 21:18:07 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l6KLI5IH000371 for ; Fri, 20 Jul 2007 17:18:05 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l6KLI5KY032581 for ; Fri, 20 Jul 2007 17:18:05 -0400 Received: from ironwood.lan (vpn-14-141.rdu.redhat.com [10.11.14.141]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l6KLI3iO029277 for ; Fri, 20 Jul 2007 17:18:03 -0400 Date: Sat, 21 Jul 2007 04:29:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: [RFC] lib/mi-support.exp: kill SID inferior prior to reconnecting Message-ID: <20070720141802.58d24ee5@ironwood.lan> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.4; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2007-07/txt/msg00243.txt.bz2 Below is another SID related patch. This patch was motivated by gdb.mi/mi-var-cp.exp which uses the inline test support in lib/mi-support.exp. The first inline test runs okay, but subsequent tests run into trouble when attempting to reconnect to SID using the same port as the existing connection. This patch simply kills (or attempts to kill) the inferior first to avoid that problem. Comments? * lib/mi-support.exp (mi_gdb_target_load): Do a "kill" prior to restarting SID. Index: testsuite/lib/mi-support.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v retrieving revision 1.47 diff -u -p -r1.47 mi-support.exp --- testsuite/lib/mi-support.exp 23 May 2007 12:41:14 -0000 1.47 +++ testsuite/lib/mi-support.exp 19 Jul 2007 00:52:03 -0000 @@ -464,6 +464,10 @@ proc mi_gdb_target_load { } { } } elseif { [info procs send_target_sid] != "" } { # For SID, things get complex + send_gdb "kill\n" + gdb_expect 10 { + -re ".*$mi_gdb_prompt$" + } send_target_sid gdb_expect 60 { -re "\\^done.*$mi_gdb_prompt$" {