From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26292 invoked by alias); 21 May 2010 15:02:45 -0000 Received: (qmail 26263 invoked by uid 22791); 21 May 2010 15:02:44 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 May 2010 15:02:37 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C86142BAC07; Fri, 21 May 2010 11:02:34 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BnNWyPCk86zu; Fri, 21 May 2010 11:02:34 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 957302BABF2; Fri, 21 May 2010 11:02:34 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 707A5F58FA; Fri, 21 May 2010 08:02:31 -0700 (PDT) Date: Fri, 21 May 2010 15:04:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] Forbid run with a core file loaded Message-ID: <20100521150231.GP3019@adacore.com> References: <20100521134718.GA17157@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100521134718.GA17157@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-05/txt/msg00482.txt.bz2 > (gdb) start > Starting program: /bin/sleep > ^^^^^^^^^^^^^^^^ !!! > [...] Hah! I was convinced we would ask confirmation to the user in this case... I agree we should. > 2010-05-21 Jan Kratochvil > > Forbid run with a core file loaded. > * infcmd.c (run_command_1) : New. This looks fine to me (but let's wait for Mark to confirm that there was a misunderstanding - I'll followup separately). > gdb/testsuite/ > 2010-05-21 Jan Kratochvil > > Forbid run with a core file loaded. > * gdb.base/corefile.exp (load core again, start with core) > (started with core): New tests. > +set test "start with core" > +gdb_test_multiple "start" $test { > + -re {Core file is already loaded. Unload it[?] [(]y or n[)] } { > + pass $test > + } > +} We should not use the "start" command in testcases, as it does not work with remote targets. I'm afraid we're going to have to rely on the run command instead. -- Joel