From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id 726013858D32 for ; Mon, 15 Apr 2024 17:02:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 726013858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 726013858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713200544; cv=none; b=KSBN93iDENaXCTIO+L0v+cBJbb8fFWAHxEAkYyUNtvVCb/5gr635BmWm70k2Rs2Da+AIEgQs/PpnCLQHFKHWbC14a77ord6glIXV4mGoBgAg4hrWvf7YfUGdUZlXQl+nG8EICE0doNSLgQXiD4l/kTvea8yuvaXWaUN9vA4/zFw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713200544; c=relaxed/simple; bh=VwQ2Qc/EXnbInDONz5MkrWw25qYxOwSNRwW8OvznMTg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UOpEU+hI2w4K095GNAIlfkz9zqCKhLBESFYDMejzMWNCgpNh19y8rxBJKqfL0kzBlrud+zOsSQgMLzXHXfUzvMQz8XRc6MirrXfJIa4il2tN5wWt86q0BnaL6DCftnuDyrM/anN+W5mxuQapdZjVHktDKCJSF3G5kKqwhlo0FiQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5005a.ext.cloudfilter.net ([10.0.29.234]) by cmsmtp with ESMTPS id wOmbrWrj5HXmAwPifry5qi; Mon, 15 Apr 2024 17:02:13 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id wPiera7xTYakKwPierqZob; Mon, 15 Apr 2024 17:02:12 +0000 X-Authority-Analysis: v=2.4 cv=a4T79lSF c=1 sm=1 tr=0 ts=661d5d94 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=raytVjVEu-sA:10 a=Qbun_eYptAEA:10 a=T_Alst9gAAAA:8 a=zstS-IiYAAAA:8 a=3-BHKFoAJE2VGcLOW04A:9 a=ZXulRonScM0A:10 a=DvZ5ixILWSEuw56YIEpp:22 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dA7066Sw10hXYtNfPRLTO8qksxs6uwGy3c3ukd+V6lY=; b=lyAhYhjxGJTlPMciJADgdcjMbJ kyudrGJef433TGe0LJrdkBm2TZk1dH4g6/Owxbusv94bQKE4KIhbZNqGIJpW8bIqlvfVC+07nCmHa 4ZVkCN4fw5+CqUJrR+nSa9bOR; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:46244 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rwPie-0044mb-0F; Mon, 15 Apr 2024 11:02:12 -0600 From: Tom Tromey To: Pedro Alves Cc: Hannes Domani , "gdb-patches@sourceware.org" Subject: Re: [PATCH v2] gdb/Windows: Fix detach while running References: <20240411200356.270360-1-pedro@palves.net> <178084166.332205.1712919405648@mail.yahoo.com> <625b2dbb-6cb8-40dd-b7d0-fbce48cb5436@palves.net> X-Attribution: Tom Date: Mon, 15 Apr 2024 11:02:11 -0600 In-Reply-To: <625b2dbb-6cb8-40dd-b7d0-fbce48cb5436@palves.net> (Pedro Alves's message of "Fri, 12 Apr 2024 14:41:47 +0100") Message-ID: <878r1e36gc.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.82.115 X-Source-L: No X-Exim-ID: 1rwPie-0044mb-0F X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net (murgatroyd) [97.122.82.115]:46244 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfL1PVGy0JpDDOp4m4JoyXUD1sS1MarCKSt93uo/9B5lif7LwLg1LCqszh89DEkWGJTD4q4BSn6NR8abmqpV3tyfqbZG2onIUHsU4LNznwY49EM/9iBGy ecyVvTvWY5lys7QE5ftIRrLBa7NK0UH9YLCLkLHJAcEZnJe/zypNoTMgEgCR30hJzAmzY9UP0yqf/VXWvgtAmZlzu59l4a8orJ4= X-Spam-Status: No, score=-3015.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Pedro" == Pedro Alves writes: Pedro> Still in windows_nat_target::detach, we have an interesting issue that Pedro> ends up being the bulk of the patch -- only the process_thread thread Pedro> can call DebugActiveProcessStop, but if it is blocked in Pedro> WaitForDebugEvent, we need to somehow force it to break out of it. Pedro> The only way to do that, is to force the inferior to do something that Pedro> causes WaitForDebugEvent to return some event. I generally like the Windows debug API but I can't really understand why they didn't integrate WaitForDebugEvent with WaitForMultipleObjects -- it seems like such an obvious thing to do and it would have saved so many headaches. I didn't read the patch in too much detail, but I did look over it and I read through the explanation. It all makes sense to me. I was wondering if something similar is needed for gdbserver? I assume not though. Reviewed-By: Tom Tromey Tom