From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8573 invoked by alias); 21 May 2010 15:04:38 -0000 Received: (qmail 8543 invoked by uid 22791); 21 May 2010 15:04:37 -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:04:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C5C292BAB6C; Fri, 21 May 2010 11:04:31 -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 BP-80JdBjmlO; Fri, 21 May 2010 11:04:31 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6F5352BAB67; Fri, 21 May 2010 11:04:31 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 3BB7BF58FA; Fri, 21 May 2010 08:04:28 -0700 (PDT) Date: Fri, 21 May 2010 15:05:00 -0000 From: Joel Brobecker To: Mark Kettenis Cc: jan.kratochvil@redhat.com, gdb-patches@sourceware.org Subject: Re: [patch] Forbid run with a core file loaded Message-ID: <20100521150428.GQ3019@adacore.com> References: <20100521134718.GA17157@host0.dyn.jankratochvil.net> <201005211447.o4LEl7tQ019880@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201005211447.o4LEl7tQ019880@glazunov.sibelius.xs4all.nl> 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/msg00483.txt.bz2 > > there is already a protection against loading a core file when a program is > > running. > > That makes sense. But what you are suggesting doesn't. > > I often start gdb and load a core file to investigate a problem. Then > I set a breakpoint at some point before the crash and run the program > again. This used to work just fine. There might have been a poor choice of words in the subject - Based on the patch, Jan is not proposing to actually forbid that operation. Rather, he's suggesting we add a confirmation query before actually restarting the inferior. Would you agree to such a change? -- Joel