From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24040 invoked by alias); 21 May 2010 15:40:50 -0000 Received: (qmail 24031 invoked by uid 22791); 21 May 2010 15:40:49 -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 sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 May 2010 15:40:41 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o4LFbjmp015039; Fri, 21 May 2010 17:37:45 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o4LFbiGi009032; Fri, 21 May 2010 17:37:44 +0200 (CEST) Date: Fri, 21 May 2010 15:54:00 -0000 Message-Id: <201005211537.o4LFbiGi009032@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: pedro@codesourcery.com CC: gdb-patches@sourceware.org, jan.kratochvil@redhat.com In-reply-to: <201005211605.01345.pedro@codesourcery.com> (message from Pedro Alves on Fri, 21 May 2010 16:05:01 +0100) Subject: Re: [patch] Forbid run with a core file loaded References: <20100521134718.GA17157@host0.dyn.jankratochvil.net> <201005211447.o4LEl7tQ019880@glazunov.sibelius.xs4all.nl> <201005211605.01345.pedro@codesourcery.com> 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/msg00493.txt.bz2 > From: Pedro Alves > Date: Fri, 21 May 2010 16:05:01 +0100 > > 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 . I don't think I go back again to the core file very often, but it seems to work fine with gdb 6.3 for a single-threaded process. > For this to work correctly, we'd need to rethink the single target-stack, > into maybe multiple target stacks, or something else radically different. Dunno. Isn't it enough to pop the core layer when you run?