This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Checkpoint: wait the defunct process when delete it
On Tuesday 11 May 2010 23:43:04, Michael Snyder wrote:
> old_cleanup = save_inferior_ptid ();
> inferior_ptid = fd->parent_ptid;
>
> Something like this? Then the original inferior_ptid will be
> restored when you do
>
> > + if (call_function_by_hand (waitpid_fn, 3, argv) == 0)
> > + return -1;
>
> do_cleanups();
>
> > + return 0;
> > +}
That won't work. You will hit an assertion somewhere: either because
inferior_ptid is not found in the linux-nat.c lwp list, or because
inferior_ptid is not found in gdb's thread list. I believe you'll
need to do a full linux_nat_switch_fork and back.
--
Pedro Alves