From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RS0LHrvd/GmOwR8AWB0awg (envelope-from ) for ; Thu, 07 May 2026 14:45:15 -0400 Received: by simark.ca (Postfix, from userid 112) id 6AD8C1E0BA; Thu, 07 May 2026 14:45:15 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 717431E067 for ; Thu, 07 May 2026 14:45:14 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C660E4BA2E25 for ; Thu, 7 May 2026 18:45:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C660E4BA2E25 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by sourceware.org (Postfix) with ESMTPS id D8F5E4BA2E25 for ; Thu, 7 May 2026 18:44:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8F5E4BA2E25 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D8F5E4BA2E25 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778179490; cv=none; b=O0hYutHRtYI1EFnN8HtfguxrZh74y+KbvV2qylNpO4m0lA27sxykMiaj0JD/To8xFfBseEzfCljBfAk2ke1S2AqzUwvaZ9L3MM9ObbOQIK3iITFEMl/zouBE3RsZnU9OVwAxe4l1K22IsfIfqCmn8NvX0nq2+LCFp/BUavdtjAY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778179490; c=relaxed/simple; bh=EMx+tRecYgsFPZhTFsrN9C424mWrUFJgO+PGpAeMXTI=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=bwziC7xlZSN8kj0jVKLv2uL/Uj7/X6epLNmSZ89jW+aHxisK6es7DLgdNUciJcsf0XuhrcPztYeDmwbiWy7ooZzKu7QMtGq4d4hw+z65PjIT5hPfYswqPUK9RDhfvTDSlPAoHCtYa/WsvbCTdmDY4tjRg9gdbgKZwpBXKTdZEls= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8F5E4BA2E25 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-488ab2db91aso13871025e9.3 for ; Thu, 07 May 2026 11:44:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778179489; x=1778784289; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mCY22SDzj28Y8BIXlcVZAFDuafkXaGsAmncouYZZFeE=; b=qDFh0Oxs49An1/9ZuoouhViMVgqeShgTBvoinvFxH/mQ72UGioePZRF+aMuU9X/VGK NnBPRDzxWNDw+kBKtIZNvCjCIvp0JK+4ZAQ8PH+CBoVIdf8GrGrntGTlUidW7SiGtJ4z dNrdF69cakoQV5Lt2jyCElnDHJgkt3yrJH4+nvrCwNXdqjht4lBtQF52xpt9ysf4sqQd 8YhyxOVwHIqyHDm2Lq80B//oI/Zt8Vmh6JQThIdzWouIvmSF81Zb63d/g8vOSWBxT4v0 iNNV0+PxfKO41U32mgiiKlUbbBC1jyf8qnu/sG8j5j5mFI9xDXrvQbm/VJuRLj5XAA6C 862g== X-Gm-Message-State: AOJu0Yxy1vwoacB4Dlu7CnivJlEg3AjQdiyaatgFe2aKCjImBg2X0yPJ HfEBnfTOtLoDNiN9474fJc+nTq5DR+XdvjSHcBQbeJVDCV1qVzYh3f3w X-Gm-Gg: AeBDieu9P1yzFCsS3/PpLZxXnUZTJHL8TbMcvwFJwCaT8Hthzyqf1gaTLiNC/QAffOE ot6Vt91hzv/pcvnzMr225rRLUp7/4h7BxYEwNajdg5OIZXw4C9rrms5m2vZYbXkCo4KLYY5bGhA f/tsirq5k5u+YtrS6ewTYk1FCGxOBV2VWZVb+O0MGXaMNIp/tKL/wDVwmPDtq4q6boii0b+Nfvn IsZpd2kiixFv4IyWS8UwFDRMXhDHNzVtKcABwitkTONtrBKG5QNcQ8Ibk9gPu2+rLe9qQzvv0ec Apac8evlHmyzrfdMfQ41cADIGHo6if/S5pp5Z/eIGfpYZ14Jel6nOdfpMPn9UB29FE3pEuw7t58 fNXGjGrPvvWvtevBbOd0KtnYpwqLTZCspovPX1vjanEGu2Uqw33HWjV0cBu5u1ORoilNg9I+xgo A7mQBuyXY+z06s7qzXJaSeueRibw35qqVeLKRghZBp7wYEU5RJB/XXXyOST7XNXck= X-Received: by 2002:a05:600c:a411:b0:488:af48:af11 with SMTP id 5b1f17b1804b1-48e51e08ce3mr112934345e9.1.1778179488641; Thu, 07 May 2026 11:44:48 -0700 (PDT) Received: from ?IPV6:2001:8a0:facb:a800:4a00:4ee0:fe55:363? ([2001:8a0:facb:a800:4a00:4ee0:fe55:363]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-454177df883sm774357f8f.34.2026.05.07.11.44.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2026 11:44:47 -0700 (PDT) Message-ID: <66e3c2d7-3caf-4ca5-8267-ddf0d306635e@palves.net> Date: Thu, 7 May 2026 19:44:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Windows gdb: all-stop, interrupt with "stopped" instead of SIGTRAP To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20260505122434.1444507-1-pedro@palves.net> <87fr46eya0.fsf@tromey.com> From: Pedro Alves Content-Language: en-US In-Reply-To: <87fr46eya0.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 2026-05-05 15:17, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves writes: > > Pedro> Currently, "interrupt" uses DebugBreakProcess (or equivalent), which > Pedro> injects a new thread in the inferior that executes an int3 instruction > Pedro> (on x86), which raises a SIGTRAP. With the target backend in non-stop > Pedro> mode, its easy to avoid all that and make interrupt in all-stop just > Pedro> suspend a pre-existing thread and report "stopped", like "set non-stop > Pedro> on" does (via target_stop). > > Looks reasonable to me, thanks. > Approved-By: Tom Tromey > Thanks, merged. > Pedro> +void > Pedro> +windows_nat_target::stop (ptid_t ptid) > Pedro> +{ > Pedro> + stop_interrupt (ptid, false); > Pedro> +} > > I guess this didn't land: > > https://sourceware.org/pipermail/gdb-patches/2026-April/226456.html > Oh, I hadn't seen that. (If it isn't obvious, I haven't been able to keep up with the list in the past year or so. I'm hoping that will change soon-ish.) I had been sitting on this patch until non-stop was in. Apparently for exactly 3 years! :-P commit 88ae0d8325ced6d62781f1838e2bfa6195866929 Author: Pedro Alves AuthorDate: Fri May 5 15:51:31 2023 +0100 Commit: Pedro Alves CommitDate: Thu May 7 19:32:35 2026 +0100 > but OTOH I think your implementation is more precise. Yeah, that one ignores the ptid argument completely, and would just make target_stop inject the magic ctrl-c thread, which is not what the semantics of target_stop should be. Note "windows_nat_target::stop(ptid_t ptid)" already existed, it was added by the non-stop support. This patch is refactoring it to be usable from the interrupt() context. Thanks, Pedro Alves