Re: [patch] Forbid run with a core file loaded

Pedro Alves
2010-05-21T15:05:13Z

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>.

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