This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Forbid run with a core file loaded
> From: Pedro Alves <pedro@codesourcery.com>
> 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 <http://sourceware.org/ml/gdb-patches/2008-08/msg00290.html>.
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?