]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Windows gdb+gdbserver: Eliminate windows_process_info::thread_rec
authorPedro Alves <pedro@palves.net>
Tue, 9 May 2023 09:18:09 +0000 (10:18 +0100)
committerPedro Alves <pedro@palves.net>
Fri, 24 Apr 2026 20:28:44 +0000 (21:28 +0100)
After the previous patches, thread_rec is no longer called anywhere.
Delete it.

Approved-By: Tom Tromey <tom@tromey.com>
Change-Id: Ib14e5807fc427e1c3c4a393a9ea7b36b6047a2d7

gdb/nat/windows-nat.h
gdb/windows-nat.c
gdb/windows-nat.h
gdbserver/win32-low.cc
gdbserver/win32-low.h

index 2cc665fb53c57232e6313165e37a08d451f08faf..8920d445838523067761476b3abfc532d146628b 100644 (file)
@@ -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.
index aae4de42a73267cd46097761519003f0f3b4a739..2dd372ae7b2f595dd4e4b3029791fa804187c876 100644 (file)
@@ -274,14 +274,6 @@ windows_per_inferior::find_thread (ptid_t ptid)
 
 /* See nat/windows-nat.h.  */
 
-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.
index aa90dfd37d3165112881fe32b863a576ebb6fb5c..2907d97d6550dd8fa02fb954c5c3b845dbb69622 100644 (file)
@@ -27,7 +27,6 @@
 #include "ser-event.h"
 
 using windows_nat::windows_thread_info;
-using windows_nat::thread_disposition_type;
 
 /* A pointer to a function that should return non-zero iff REGNUM
    corresponds to one of the segment registers.  */
@@ -48,8 +47,6 @@ struct windows_solib
 struct windows_per_inferior : public windows_nat::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;
index 180fabe0df9d43433367c4af21c1899a03bb2a47..bf55183f705c41e96217b074560e02395435aadc 100644 (file)
@@ -127,21 +127,6 @@ gdbserver_windows_process::find_thread (ptid_t ptid)
   return static_cast<windows_thread_info *> (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<windows_thread_info *> (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)
index 48ad111ad1a39e8d13a0d7d9f52cafe6972d0dfb..402254fdad5e11bd4350550338a032b2257733d7 100644 (file)
@@ -179,9 +179,6 @@ public:
 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;