From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6VvrB6/W62kyVDkAWB0awg (envelope-from ) for ; Fri, 24 Apr 2026 16:46:39 -0400 Received: by simark.ca (Postfix, from userid 112) id 15B2D1E093; Fri, 24 Apr 2026 16:46:39 -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 9130F1E093 for ; Fri, 24 Apr 2026 16:46:38 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 2D8FF4BB8F50 for ; Fri, 24 Apr 2026 20:46:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D8FF4BB8F50 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by sourceware.org (Postfix) with ESMTPS id 712C74B920FA for ; Fri, 24 Apr 2026 20:45:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 712C74B920FA 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 712C74B920FA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777063550; cv=none; b=Wurhq7s47Qi1VGTwxtJCqN3Iw4LmaRvcGOTnt6MN24i+5ktzd1FhU9X3itmHiKx1cpg6OAILaEfq4g5nfH9mi2+k/c1RNw4twDSebBwlVWJoogC90VR8GbDGgqn9cCjMuN4/MFzzsfLu7ODxnEqpzk8EaocIuBlwsNQIG+5TMIg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777063550; c=relaxed/simple; bh=+7PPVTyaXHKz9SjIFyQkRJdOOt/HoSHhau5UIEQjMq8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=kYka8R23N2WumxdEwu3fSJE8G9Wu5YASrH3KxzRj9oaRR56x5YAchFyRld56zSNEXpzx42oRMztGNDz2NgOZs9xwpg9mBIOu6P1R7jg9ZMX0LdOjX/1Vj+COS5P97q984XANaZq2+gKxieUGo3MvPdU0R4oVBuZhDDi8vXFWfkM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 712C74B920FA Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-488a8ca4aadso113492815e9.3 for ; Fri, 24 Apr 2026 13:45:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777063549; x=1777668349; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=VeFqMqrUTLQm9SG0MYMVevXPC1T8ygf5IUmI/xh5D/w=; b=jkiOjlhBkvxcbsKUVhvx3Nd+YP0x7SJPn+/312n2cCLspFcV/lPZzY0MIm+mFyKb4G FOUhWad+pr90qHbxOERMPyHjK9pA+nHx5GD+Bl8A67QxS5e0hy6l2O8UW5pg3jve4K5e X8Q6I/vuW+PqhJ3d187fDOC3LyxgGMUO5Rzy+XWnp9TJM+6+nV4DdyLDMVFDt+O8qCuf lmkj8xXSjWzt6hDeAQMNczVVIvRXw88RxpdFotEO7AiEjZ1GUFEshJnRzDgEGqaQvnM7 Ajr30LwrVQbQtA6vaxxLJeiR7ONhTP2YJ8VL3g0HW/a09nN0Iirmcr4+Bm1lAlke7Qa1 Ef+Q== X-Gm-Message-State: AOJu0YwU5DYYwZL3Q2Tw0FT41fh87h1YKKkBYkgHCwH4Ps0Cnpg2w15k dW4DsX5dy3Ub8qT/JWWEkYmOH8ebz5xL8Ac/jarYQTu2izn64Ze5ST8Hzr/NXRzQ X-Gm-Gg: AeBDietpS9F86YYQTZei/sE3tbi8sm3sRxeG/8dsTarP7UtgeLInHIQn1FJe5wJ54zW sISlO4Pmdpvbs0CU2D8g/nHVPN2INZ/CxKWZ8OZ5Q11MtsQdstqL9SUB+qQtlLnNHT86x83jXKc DDuzfMJOlByM86xSqdeDZq8yrtYNrWfaJ1EkCGp8vhrieSsOwzJD2yDD05Ci3Wdw3C1bH3yv4R8 dHs0UxtvHgqHRDWfPqrOoZKE+pESfOXTbMtHkNKvAcSCd/lP9/AzFplJUcdzZ/JxwsPVxyd3esD z6GQJq/CWMJDWVdxyWsP2G8HguxykjylrDIUbQYcADJmNXz3rO2+fXMOwk0lptVvZLHlm1+1gjF WHsggAIjSFzh2y/S2rKsPPUD7ipQNBdiGQ040L+MUXCvyc//IhmAJx7KoXCMaPGeNt4hblCcGME wiAfRpQ0J0zQZrlBGjQUlUctO8lc2vA55n X-Received: by 2002:a05:600c:620d:b0:489:1d23:4524 with SMTP id 5b1f17b1804b1-4891d23468bmr334965065e9.5.1777063548977; Fri, 24 Apr 2026 13:45:48 -0700 (PDT) Received: from localhost ([2001:8a0:facb:a800:7315:8865:c664:fc06]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-48a55dc9f58sm616527675e9.6.2026.04.24.13.45.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2026 13:45:48 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed 11/28] Windows gdb: Factor code out of windows_nat_target::windows_continue Date: Fri, 24 Apr 2026 21:44:51 +0100 Message-ID: <20260424204508.1343973-12-pedro@palves.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260424204508.1343973-1-pedro@palves.net> References: <20260424204508.1343973-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This factors some code out of windows_nat_target::windows_continue into a new windows_continue_one function. This will make the following patch easier to read (as well as the resulting code itself). Approved-By: Tom Tromey Change-Id: I14a0386b1b8b03015e86273060af173b5130e375 --- gdb/windows-nat.c | 16 ++++++++++------ gdb/windows-nat.h | 3 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 170b837e930..2ecb8a105c0 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -704,6 +704,15 @@ windows_per_inferior::handle_access_violation return false; } +void +windows_nat_target::continue_one_thread (windows_thread_info *th, + windows_continue_flags cont_flags) +{ + bool killed = (cont_flags & WCONT_KILLED) != 0; + thread_context_continue (th, killed); + th->resume (); +} + /* Resume thread specified by ID, or all artificially suspended threads, if we are continuing execution. See description of windows_continue_flags for CONT_FLAGS. */ @@ -725,12 +734,7 @@ windows_nat_target::windows_continue (DWORD continue_status, int id, for (auto &th : windows_process->thread_list) if (id == -1 || id == (int) th->tid) - { - bool killed = (cont_flags & WCONT_KILLED) != 0; - thread_context_continue (th.get (), killed); - - th->resume (); - } + continue_one_thread (th.get (), cont_flags); continue_last_debug_event_main_thread (_("Failed to resume program execution"), continue_status, diff --git a/gdb/windows-nat.h b/gdb/windows-nat.h index c4f3b2423b6..221ce58a887 100644 --- a/gdb/windows-nat.h +++ b/gdb/windows-nat.h @@ -243,6 +243,9 @@ struct windows_nat_target : public inf_child_target void delete_thread (ptid_t ptid, DWORD exit_code, bool main_thread_p); DWORD fake_create_process (); + void continue_one_thread (windows_thread_info *th, + windows_continue_flags cont_flags); + BOOL windows_continue (DWORD continue_status, int id, windows_continue_flags cont_flags = 0); -- 2.53.0