This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix foll-fork.exp foll-vfork.exp fork-child-threads.exp
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pedro at codesourcery dot com (Pedro Alves)
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 20 Nov 2008 17:36:58 +0100 (CET)
- Subject: Re: Fix foll-fork.exp foll-vfork.exp fork-child-threads.exp
Pedro Alves wrote:
> On Thursday 20 November 2008 14:28:24, Ulrich Weigand wrote:
>
> > I guess the "regcache" and "gdbarch" variables now also contain stale
> > information. That's not an actual problem right now, as regcache is
> > (currently) not used after this point, and gdbarch (today) will never
> > actually change -- but in order to reduce potential future problems,
> > I think those should also be reset.
>
> Right, how about the attached?
> 2008-11-20 Pedro Alves <pedro@codesourcery.com>
>
> * infrun.c (resume): If following a fork, also reset regcache,
> gdbarch and pc.
Looks good to me, thanks.
As a separate question, I'm wondering why this is the right place to
put the follow-fork logic anyway (and not in handle_inferior_event
like follow-exec ...). Do you know the history of this?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com