From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8MICDoIyK2g2NyoAWB0awg (envelope-from ) for ; Mon, 19 May 2025 09:30:42 -0400 Received: by simark.ca (Postfix, from userid 112) id 36EF51E11C; Mon, 19 May 2025 09:30:42 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 666311E102 for ; Mon, 19 May 2025 09:30:41 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 07E5C385840D for ; Mon, 19 May 2025 13:30:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07E5C385840D Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by sourceware.org (Postfix) with ESMTPS id F030A385840D for ; Mon, 19 May 2025 13:23:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F030A385840D 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 F030A385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1747661036; cv=none; b=Zv1CtfbJOlbr+1B2rvZrYwLENZLkMAqFsCFKLeWq7dYKRCQ/HXQa36T64wuWGfc/ByOBck9gbFSKFZBYkV+PyKtK74thbSATis+rqcwWc3ZPI/Fuj8PQu2IjcOLQ5TjY9/t+GfYD+APyuNWy3lb98H++M4hLE7PMDpwiGHqG580= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1747661036; c=relaxed/simple; bh=Uw+MmwotH47LnAb6vgg9fbB8WE8yQ8deOxCmEjC47sw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=t8y1+di36Et2MHIQmx3wNbcZ54a5FCxFueGTq8jucyZOUC/00pLbN+wEvQjzpI3jaff7SRtXsMFZA/F9LXUMtWp8ZoVqWeoewj3Zr52N0mgQRsX5xveOR50FSUU77feLToUtFzIxlCMSTmc8Mbs6rcsU3s6WzantF/tqtI1piHw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F030A385840D Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-442f9043f56so23139985e9.0 for ; Mon, 19 May 2025 06:23:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747661034; x=1748265834; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+7QaFvE6GLfkTjURcjOPNUMTCqr4rwbWMxmVFFTmTuM=; b=fvrmbRswJo+EE+izEQp1o5ni7fA1IcZeDlZjT1IO1Qd0Mj3oYQRNetkqmVHAmK1pBu fTR2tQqg8Rgo7Ax7fLQvHKPHWxPCVX4n+Rnz5rFUF1p1fyWCW31icESViVYBoTNV+vy7 LX/VaS0vgJNw7WtvNSv9kQcrm4oJ7RwXpe/n++uZvq8rHmrA1tho8dpotKAkfHwMpvTT 1+X7nn57XLVJ4/VlP/qrb0o5otWJP6TFg1zD9JyV+ahyYv8i3cFThHXhGktv+QaMuhGX Gwb0ngEvBWmzQg5Po7o2nhFCyEYY6U9qi4AlLHgVRHTcoXL5jIBOSVzJD0jqrlkMAU5B o10w== X-Gm-Message-State: AOJu0Yw1eW4ox58obAjnkjgG5/9ZjG4j2pnikw5c4iaW/AUB52qqKCTe +T1P9LVx/d7ZKkAwKChq8h04qjtFBr23cV7+OarsBSd1MnF66rDa7RrOYm/2Sama X-Gm-Gg: ASbGncvLG5V8yg9oZE+nX5Y3BMXDF/OSZ79hRb8HT52DnMSdxCEN6VFBbp6SNG0DAmW zgPTTJWX+jeNtyK1i2cS54RUu4+/0N4l3xB1Au05GQcCNGYQHDJvQ/w3pxsILkaSKEcPtIPNLtk NVUBsJ827o4RposNTVp7dq+PNVKKKBoAOI+cHCRceKbCkUjqHlxOfgvn06xz+/xMNw/BBrQPPse HjWxubZLw7JZexYVB2hzpoyxlXhZ5b+C8BTzO7kypydgnrFcWmOTNhm0luWi9ocYllqehaRa4Rt DzeM1C6dSOO6Yx5H2qxsG7mRrorDgzrcUrPfUATZRiwxkKh4fDU= X-Google-Smtp-Source: AGHT+IFBNvNRx5ckceZgrgj9QGlS4dNAN4I6pdhSbJA2+UsC60feOHlKa+iEgbnUMb0VwTIyGUa4KQ== X-Received: by 2002:a05:6000:230a:b0:3a0:9dc2:5e0e with SMTP id ffacd0b85a97d-3a35c835093mr13091751f8f.11.1747661034285; Mon, 19 May 2025 06:23:54 -0700 (PDT) Received: from localhost ([2001:8a0:4fe9:b400:8d90:6f0d:36bf:32df]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a35ca88a13sm12684085f8f.74.2025.05.19.06.23.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 May 2025 06:23:53 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 13/47] Windows gdb+gdbserver: Eliminate windows_process_info::thread_rec Date: Mon, 19 May 2025 14:22:34 +0100 Message-ID: <20250519132308.3553663-14-pedro@palves.net> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250519132308.3553663-1-pedro@palves.net> References: <20250519132308.3553663-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 After the previous patches, thread_rec is no longer called anywhere. Delete it. Approved-By: Tom Tromey Change-Id: Ib14e5807fc427e1c3c4a393a9ea7b36b6047a2d7 --- gdb/nat/windows-nat.h | 13 ------------- gdb/windows-nat.c | 10 ---------- gdbserver/win32-low.cc | 15 --------------- gdbserver/win32-low.h | 3 --- 4 files changed, 41 deletions(-) diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h index 4fb38e81631..9f1ecb4429b 100644 --- a/gdb/nat/windows-nat.h +++ b/gdb/nat/windows-nat.h @@ -104,11 +104,6 @@ struct windows_thread_info }; -/* Possible values to pass to 'thread_rec'. */ -enum thread_disposition_type -{ -}; - /* A single pending stop. See "pending_stops" for more information. */ struct pending_stop @@ -178,14 +173,6 @@ struct windows_process_info This function must be supplied by the embedding application. */ virtual windows_thread_info *find_thread (ptid_t ptid) = 0; - /* Find a thread record given a thread id. THREAD_DISPOSITION - controls whether the thread is suspended, and whether the context - is invalidated. - - This function must be supplied by the embedding application. */ - virtual windows_thread_info *thread_rec (ptid_t ptid, - thread_disposition_type disposition) = 0; - /* Handle OUTPUT_DEBUG_STRING_EVENT from child process. Updates OURSTATUS and returns the thread id if this represents a thread change (this is specific to Cygwin), otherwise 0. diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 2425ec5f897..f15b7520296 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -94,8 +94,6 @@ struct windows_solib struct windows_per_inferior : public windows_process_info { windows_thread_info *find_thread (ptid_t ptid) override; - windows_thread_info *thread_rec (ptid_t ptid, - thread_disposition_type disposition) override; DWORD handle_output_debug_string (struct target_waitstatus *ourstatus) override; void handle_load_dll (const char *dll_name, LPVOID base) override; void handle_unload_dll () override; @@ -531,14 +529,6 @@ windows_per_inferior::invalidate_context (windows_thread_info *th) th->context.ContextFlags = 0; } -windows_thread_info * -windows_per_inferior::thread_rec (ptid_t ptid, - thread_disposition_type disposition) -{ - windows_thread_info *th = find_thread (ptid); - return th; -} - /* Add a thread to the thread list. PTID is the ptid of the thread to be added. diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index 42026971037..c99248d37cb 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -132,21 +132,6 @@ gdbserver_windows_process::find_thread (ptid_t ptid) return static_cast (thread->target_data ()); } -/* See nat/windows-nat.h. */ - -windows_thread_info * -gdbserver_windows_process::thread_rec - (ptid_t ptid, thread_disposition_type disposition) -{ - thread_info *thread = find_thread_ptid (ptid); - if (thread == NULL) - return NULL; - - auto th = static_cast (thread->target_data ()); - win32_require_context (th); - return th; -} - /* Add a thread to the thread list. */ static windows_thread_info * child_add_thread (DWORD pid, DWORD tid, HANDLE h, void *tlb) diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h index b12c217c406..3c49ca7de9b 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -182,9 +182,6 @@ class win32_process_target : public process_stratum_target struct gdbserver_windows_process : public windows_nat::windows_process_info { windows_nat::windows_thread_info *find_thread (ptid_t ptid) override; - windows_nat::windows_thread_info *thread_rec - (ptid_t ptid, - windows_nat::thread_disposition_type disposition) override; DWORD handle_output_debug_string (struct target_waitstatus *ourstatus) override; void handle_load_dll (const char *dll_name, LPVOID base) override; void handle_unload_dll () override; -- 2.49.0