]> 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>
Mon, 9 Jun 2025 17:09:12 +0000 (18:09 +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
gdbserver/win32-low.cc
gdbserver/win32-low.h

index 4fb38e8163133020d2d5857d97849d6367956fff..9f1ecb4429b3db1d61f697ba0f29e47795ef8402 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 77f7b13e6aff0e2e3b0dc0c13e577cbd1234e663..8e0abe9403f7035c33da8802e61c9c4ada88c939 100644 (file)
@@ -93,8 +93,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;
@@ -535,14 +533,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.
index 4202697103700a16b694ad74a149f244f0e1f746..c99248d37cb4cce03849fa9294f6dcf418da5037 100644 (file)
@@ -132,21 +132,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 b12c217c406160e2e9d7df7bf43d9d5c7c6f1cc3..3c49ca7de9b8343c6ce8e3246599fc563437f164 100644 (file)
@@ -182,9 +182,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;