From patchwork Tue May 7 23:42:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 89681 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 570CD3849AE0 for ; Tue, 7 May 2024 23:44:15 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by sourceware.org (Postfix) with ESMTPS id C435B3849ACF for ; Tue, 7 May 2024 23:43:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C435B3849ACF 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 C435B3849ACF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715125393; cv=none; b=X1F1hPcKeacOY+L/82FQrYGgDV86agVJar57J4PCe0SAgX2v+58P2VIWP9Rqthsy3iMPZ3dteFWtpnGcfH8PQZLKonb4r+Zun7GTYqh4Pgf38vJPBtaM1WaG9HIdA1yH4n+w80/tNduj+BnT1YiifeTvyYBb9Hy377LOiYOCHhE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715125393; c=relaxed/simple; bh=50r9pzjB8U+jZeHdLS6rLX9b40/Pa9AYJEt5Q21JLDo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=psA9q0k46fdX1Aju1X8cXOEcF9hhNH31cETOCCwXdl92zQ6QBHNLxNd1lcKuj3Rray+uaME21/sILYk32izYGg41RaeLT/leUhTi05/7jLrWU8yBlIjuwHtNl9v9m2m6FcANVfEypvf29Kh3lv/Dgi0khmM/90ceNgvVnjj2ufk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41b21ed19f5so26349975e9.2 for ; Tue, 07 May 2024 16:43:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715125386; x=1715730186; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P6+OTP4lGoNb1BM36HCzikytDuHC080JKHc+lMgiKX4=; b=iUGuANQhupW2KWd+lUHETXrgfRDLsnRKqIziMw91jeRkVDkGj8LqjoxGhGGI+xnFvO VwqM3xlGkV5xXgRL4iKUT7odnIWEnqT2Iu8Ma8wzCf3pWC51KZheN+1kpARN6B6LYP2H h5HkiXQG2uCyLMlKYZps06x7z04V9PqOb/UOwE5d4jkwPXRPqKoqfPw+L7d8IBjrL11E BEVXtZXXt7WNNXAYSvXGkVKeCOU3XcvXj6YkbeOohQDrMhyM6b+e3K0EnYSl0ra/UHbR SSvj6bEXn5vIBsb9FfW1B5TbY/Ju6LqGeUnmgXpCW2sCsrk74IvBraXuoSuRSm1Tjeiy IBNg== X-Gm-Message-State: AOJu0YwrUMEzhA6a2B4BLysTyvdc2p8MxFUc9hl9mxpm6xb5pBFZFoti 9sQ3jpT81Kztipby7tgc+5jbn3ObRou1DJXJItSk9dIrRmu45LTSmnAHAjJx X-Google-Smtp-Source: AGHT+IELf90d7RZZLpUgrUw3A8DyAgli5exBJHizGut6MyykJ97ZsgajUMQqBEBuCQGYZKxt7gKRaA== X-Received: by 2002:a05:600c:1992:b0:41c:14a4:7b05 with SMTP id 5b1f17b1804b1-41f71302ac3mr7317565e9.8.1715125386373; Tue, 07 May 2024 16:43:06 -0700 (PDT) Received: from localhost ([2001:8a0:f908:4900:2dd1:1a0d:2b75:dc42]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-41f87d1fc93sm1962495e9.21.2024.05.07.16.43.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 16:43:05 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 08/34] Windows gdb+gdbserver: Eliminate windows_process_info::thread_rec Date: Wed, 8 May 2024 00:42:07 +0100 Message-ID: <20240507234233.371123-9-pedro@palves.net> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240507234233.371123-1-pedro@palves.net> References: <20240507234233.371123-1-pedro@palves.net> MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 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+patchwork=sourceware.org@sourceware.org After the previous patches, thread_rec is no longer called anywhere. Delete it. 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 e18edc995b5..fdbab0fc566 100644 --- a/gdb/nat/windows-nat.h +++ b/gdb/nat/windows-nat.h @@ -98,11 +98,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 @@ -172,14 +167,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 f5435d70ed3..9b1bedee250 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -91,8 +91,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; @@ -537,14 +535,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 b693da583b0..0d67cd984e4 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -150,21 +150,6 @@ gdbserver_windows_process::find_thread (ptid_t ptid) return (windows_thread_info *) thread_target_data (thread); } -/* 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; - - windows_thread_info *th = (windows_thread_info *) thread_target_data (thread); - 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 8162d975227..7ee4de4b37f 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -175,9 +175,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;