From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 9FDBB3861970 for ; Thu, 9 Jul 2020 17:34:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9FDBB3861970 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eliz@gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]:32928) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtaRH-0006aU-Pc; Thu, 09 Jul 2020 13:34:27 -0400 Received: from [176.228.60.248] (port=1855 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jtaRG-0001XF-JW; Thu, 09 Jul 2020 13:34:27 -0400 Date: Thu, 09 Jul 2020 20:34:12 +0300 Message-Id: <83v9iwpp7v.fsf@gnu.org> From: Eli Zaretskii To: John Baldwin Cc: simark@simark.ca, gbenson@redhat.com, palves@redhat.com, gdb-patches@sourceware.org In-Reply-To: <37dfa87e-e71b-2357-e140-02f6fd40160c@FreeBSD.org> (message from John Baldwin on Thu, 9 Jul 2020 09:37:05 -0700) Subject: Re: [PATCH] Don't compare the pid returned from wait() against inferior_ptid. References: <20200708004605.91238-1-jhb@FreeBSD.org> <20200708094831.GA9636@blade.nx> <700ffd93-43eb-22c7-b21a-8f4defdd7034@FreeBSD.org> <6891f4e5-7dc3-e2f5-05be-510607ed0485@simark.ca> <37dfa87e-e71b-2357-e140-02f6fd40160c@FreeBSD.org> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 17:34:29 -0000 > From: John Baldwin > Date: Thu, 9 Jul 2020 09:37:05 -0700 > Cc: Pedro Alves , gdb-patches@sourceware.org > > Don't compare the pid returned from wait() against inferior_ptid. > > inf_ptrace::wait() needs to discard termination events reported by > detached child processes. Previously it compared the returned pid > against the pid in inferior_ptid to determine if a termination event > should be discarded or reported. The multi-target changes cleared > inferior_ptid to null_ptid in wait() target methods, so this was > always failing and never reporting exit events. Instead, report > termination events whose pid matches any inferior belonging to the > current target. Thanks. Please allow me a minor stylistic nit: using "foo()" to indicate a function call is suboptimal, and potentially confusing: it looks like calling a function with no arguments, which is not what you want. It is better to use 'foo' instead.