From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8803 invoked by alias); 20 Nov 2008 18:25:19 -0000 Received: (qmail 8560 invoked by uid 22791); 20 Nov 2008 18:25:17 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.17.161) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 20 Nov 2008 18:24:33 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.1/8.13.1) with ESMTP id mAKIOSlL022909 for ; Thu, 20 Nov 2008 18:24:28 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id mAKIOS0V4104432 for ; Thu, 20 Nov 2008 19:24:28 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id mAKIORV9015001 for ; Thu, 20 Nov 2008 19:24:28 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id mAKIORtZ014998; Thu, 20 Nov 2008 19:24:27 +0100 Message-Id: <200811201824.mAKIORtZ014998@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 20 Nov 2008 19:24:27 +0100 Subject: Re: Fix foll-fork.exp foll-vfork.exp fork-child-threads.exp To: pedro@codesourcery.com (Pedro Alves) Date: Fri, 21 Nov 2008 11:40:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <200811201652.35125.pedro@codesourcery.com> from "Pedro Alves" at Nov 20, 2008 04:52:34 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2008-11/txt/msg00566.txt.bz2 Pedro Alves wrote: > On Thursday 20 November 2008 16:36:58, Ulrich Weigand wrote: > > 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? > > To be able to decide if you want to follow a child or a parent > when you catch a fork with "catch fork". Ah, I see. Makes sense. However, even given that we need to do it in "resume" -- why so late in resume, after e.g. displaced stepping or software single-step was already set up? For example, isn't singlestep_ptid set to the wrong value if we later decide to follow the child? It seems to me it would make more sense to have that decision come *first* -- and then we could use the correct thread_info and regcache etc. pointers throughout. I guess there may have been a good reason to place the call where it is, but I don't see it off-hand ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com