From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2441 invoked by alias); 10 Aug 2006 19:13:40 -0000 Received: (qmail 2432 invoked by uid 22791); 10 Aug 2006 19:13:39 -0000 X-Spam-Check-By: sourceware.org Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO bluesmobile.corp.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 Aug 2006 19:13:38 +0000 Received: from [::1] (bluesmobile.corp.specifix.com [192.168.1.32]) by bluesmobile.corp.specifix.com (Postfix) with ESMTP id 51C353B849; Thu, 10 Aug 2006 12:10:19 -0700 (PDT) From: Fred Fish Reply-To: fnf@specifix.com To: Daniel Jacobowitz Subject: Re: RFC: Don't kill the program after "file" Date: Thu, 10 Aug 2006 20:08:00 -0000 User-Agent: KMail/1.9.3 Cc: gdb-patches@sourceware.org References: <200608011617.28914.fnf@specifix.com> <20060801221105.GA22931@nevyn.them.org> In-Reply-To: <20060801221105.GA22931@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608101513.08872.fnf@specifix.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00084.txt.bz2 On Tuesday 01 August 2006 18:11, Daniel Jacobowitz wrote: > As it happens I have patches for a similar issue with target > extended-remote. The remote patches are substantial, but I can > probably break out the simulator related bits. I'll try to do that. Here's the patch I'm temporarily using to allow me to continue build and testing toolchains with the simulators. -Fred Index: gdb/gdb/testsuite/lib/gdb.exp =================================================================== RCS file: /cvsroots/latest/src/gdb/gdb/testsuite/lib/gdb.exp,v retrieving revision 1.1.1.6 diff -u -p -r1.1.1.6 gdb.exp --- gdb/gdb/testsuite/lib/gdb.exp 31 Jul 2006 20:28:17 -0000 1.1.1.6 +++ gdb/gdb/testsuite/lib/gdb.exp 7 Aug 2006 10:33:19 -0000 @@ -1017,6 +1017,9 @@ proc gdb_file_cmd { arg } { verbose "\t\tKilling previous program being debugged" exp_continue } + -re "The program is not being run.*$gdb_prompt $" { + # OK. + } -re "$gdb_prompt $" { # OK. } @@ -1024,6 +1027,11 @@ proc gdb_file_cmd { arg } { send_gdb "file $arg\n" gdb_expect 120 { + -re "A program is being debugged already..*Are you sure you want to change the file.*\\(y or n\\) $"\ + { send_gdb "y\n" + verbose "\t\tKilling previous program being debugged" + exp_continue + } -re "Reading symbols from.*no debugging symbols found.*done.*$gdb_prompt $" { verbose "\t\tLoaded $arg into the $GDB with no debugging symbols" set gdb_file_cmd_debug_info "nodebug"