From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10896 invoked by alias); 19 Jul 2007 00:45:07 -0000 Received: (qmail 10848 invoked by uid 22791); 19 Jul 2007 00:45:06 -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; Thu, 19 Jul 2007 00:45:03 +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 l6J0j1pi018885 for ; Wed, 18 Jul 2007 20:45:01 -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 l6J0j1A7001986 for ; Wed, 18 Jul 2007 20:45:01 -0400 Received: from ironwood.lan (vpn-15-13.rdu.redhat.com [10.11.15.13]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l6J0j0eZ006297 for ; Wed, 18 Jul 2007 20:45:01 -0400 Date: Thu, 19 Jul 2007 00:47:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: Re: [RFC] Adjust SID-specific version of gdb_load to honor empty argument Message-ID: <20070718174500.43b55667@ironwood.lan> In-Reply-To: <20070713163226.29458e74@ironwood.lan> References: <20070713163226.29458e74@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/msg00227.txt.bz2 Below is the patch that I ended up committing. This version differs from the patch that I originally submitted in that this version removes the call to gdb_unload. This change was suggested by Daniel in the `Add another "Are you sure..."...' thread. I've tested it and it works fine. * config/sid.exp (gdb_load): Add test for empty argument. Adjust return value to be compatible with gdb_run_cmd in lib/gdb.exp. Remove call to gdb_unload. Index: testsuite/config/sid.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/config/sid.exp,v retrieving revision 1.9 diff -u -p -r1.9 sid.exp --- testsuite/config/sid.exp 9 Jan 2007 17:59:08 -0000 1.9 +++ testsuite/config/sid.exp 19 Jul 2007 00:40:33 -0000 @@ -175,8 +175,10 @@ proc gdb_load { arg } { global gdb_prompt global retval - gdb_unload - if [gdb_file_cmd $arg] then { return -1 } + if { $arg != "" } { + if [gdb_file_cmd $arg] then { return -1 } + } + gdb_target_sid send_gdb "load\n" @@ -195,7 +197,7 @@ proc gdb_load { arg } { if $verbose>1 then { send_user "Loaded $arg into $GDB\n" } - set retval 1; + set retval 0; } -re "$gdb_prompt $" { if $verbose>1 then {