From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id 8320A3858D1E for ; Fri, 4 Aug 2023 21:30:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8320A3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4RHf511VlKz4BCS; Fri, 4 Aug 2023 21:30:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHf510h8fz4c75; Fri, 4 Aug 2023 21:30:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691184613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7x8JDthAQg63oT8YOQWwM6NgyqLI7xS6oj7YIzSHEqA=; b=XDlqfS+GP3OTjJXjk1F6YfYmYQbMKzHQJyri2RTwBJT5t2UDt5xXE61YGPNNT5ajhSvFok Q5rmUkGmcRC9Ud6P4Jixiw+xpvYfOe3NmYQIBVUSVH8pH2Xkx3PG3C5myx6S89M7tl30ya XbGnqFqb/k7fU/Pu3Xle3dDomIIYr31afPFUIcj+cBMiMO00yicbB5riXDe8LAp+4pNapy TBAkicAmXcc1fJX28SkN73I/dC5E3pyyKLiT1zKmSb9DotAh2C0aqAVkPrL6tsRsW+ujnN Su9IUc/axoUqHdIlZMbQpyv/BhxfP5eulIc7JzmFJnqs1RWgTh44TIIRrhSS/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691184613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7x8JDthAQg63oT8YOQWwM6NgyqLI7xS6oj7YIzSHEqA=; b=fKgvSmqLHGAj2dteJY6Z49b4Hs5vjBRiK4WIzmO1Wkz/UlR2OMHhwcb1nhskDLkDWWgC/r 9vmTiyZcmDXMZb/oeJCHBrQeKIZjRgstVP84phhUMWzwGYHshB1vrcuU7HMaWtNNvLBMXt JB6oeLFZKM0y3MDxgkPvE5fFSANDu7aPUW+1IpoFzk75lDVFFKSj2GzgMsiL+8En5k9mAC 107eOKpuUsGIGBKTd1vJ7tQ3G9V86fEz6aJAwSItkbI7yFR28frMoKjWRhbk8pg7GcIh2n U3c0YR5ekQhv3O9kiRt1bK5mxsbbho04CI8R0gNQRAvzyQJnww84qBJeMOxn7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691184613; a=rsa-sha256; cv=none; b=q1OO6iNFaxWaKDXhjI8GYTRf97itECwX6MZCgCTaev4LZav0233mHa6Ae7H+yhcthZtCVd jkOx6FdOF6x4Gm7pRTEJbo6EFxtxPasUQ4WtpRsAxbD5AuXYHf1B6vpnUqV46zd0YgXpzr PdyGSYeDwyNQYIe10Z7L1mWsdc4CzYM9U35VPvIzgXxwRkCrtK2dOkr0nSpf2ZG+5eMexj uUt29V2dbZi16gDHLZFK++BqtAq4lxGjRNeSBaoiCKyRuN2c84zDlha1rg2vDEEvNCLeWg xfuqK/j5+yoHqMSfa0K1U0sJBsUdjGqJ1OqP07cKK83Mc5lhCj+uivRd6QG7lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:648:8680:16b0:bc35:5797:7287:527b] (unknown [IPv6:2601:648:8680:16b0:bc35:5797:7287:527b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RHf504rBdz19bH; Fri, 4 Aug 2023 21:30:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <8aaae5f3-ad63-08a5-3ac4-2dc1d39542bd@FreeBSD.org> Date: Fri, 4 Aug 2023 14:30:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v2 3/8] fbsd-nat: Fix resuming and waiting with multiple processes. Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20230717192039.13976-1-jhb@FreeBSD.org> <20230717192039.13976-4-jhb@FreeBSD.org> <87350ybwho.fsf@tromey.com> From: John Baldwin In-Reply-To: <87350ybwho.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 8/4/23 9:30 AM, Tom Tromey wrote: >>>>>> "John" == John Baldwin writes: > > John> +/* Information stored about each inferior. */ > John> +struct fbsd_inferior_info > John> +{ > John> + /* Filter for resumed LWPs which can report events from wait. */ > John> + ptid_t resumed_lwps = null_ptid; > John> + > John> + /* Number of LWPs this process contains. */ > John> + unsigned int num_lwps = 0; > John> + > John> + /* Number of LWPs currently running. */ > John> + unsigned int running_lwps = 0; > John> + > John> + /* Have a pending SIGSTOP event that needs to be discarded. */ > John> + bool pending_sigstop = false; > John> +}; > John> + > John> +/* Per-inferior data key. */ > John> + > John> +static const registry::key fbsd_inferior_data; > > It isn't obvious from the comment (something we ought to fix), but I > think the inferior::priv field is reserved for the process stratum > target to use. So, you don't need a registry key, you can just derive > fbsd_inferior_info from 'private_inferior'. Ah, thanks. I've updated the series to do this. -- John Baldwin