From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16305 invoked by alias); 21 May 2010 15:05:13 -0000 Received: (qmail 16198 invoked by uid 22791); 21 May 2010 15:05:12 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 May 2010 15:05:07 +0000 Received: (qmail 5138 invoked from network); 21 May 2010 15:05:05 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 21 May 2010 15:05:05 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] Forbid run with a core file loaded Date: Fri, 21 May 2010 15:05:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-21-generic; KDE/4.3.2; x86_64; ; ) Cc: Mark Kettenis , jan.kratochvil@redhat.com References: <20100521134718.GA17157@host0.dyn.jankratochvil.net> <201005211447.o4LEl7tQ019880@glazunov.sibelius.xs4all.nl> In-Reply-To: <201005211447.o4LEl7tQ019880@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201005211605.01345.pedro@codesourcery.com> 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: 2010-05/txt/msg00484.txt.bz2 On Friday 21 May 2010 15:47:07, Mark Kettenis wrote: > 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. If you're refering to getting back to debugging the core when the running program exits, it never worked correctly. You'd get a better experience if your core had no threads at all. If you didn't trip on an assertion, and weird problems for having gdb consult things in the process target, then the core target (which wouldn't make sense for the running program), then the exec target, when you'd get back to debugging the core, you'd find your threads had disapeared. That's just an example. Here are others . For this to work correctly, we'd need to rethink the single target-stack, into maybe multiple target stacks, or something else radically different. -- Pedro Alves