From: Pedro Alves Date: Tue, 9 May 2023 09:18:09 +0000 (+0100) Subject: Windows gdb+gdbserver: Eliminate windows_process_info::thread_rec X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4768ec9b4ff7be5fa7ef1f073c571da928ee51e7;p=thirdparty%2Fbinutils-gdb.git Windows gdb+gdbserver: Eliminate windows_process_info::thread_rec After the previous patches, thread_rec is no longer called anywhere. Delete it. Approved-By: Tom Tromey Change-Id: Ib14e5807fc427e1c3c4a393a9ea7b36b6047a2d7 --- diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h index 2cc665fb53c..8920d445838 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 aae4de42a73..2dd372ae7b2 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -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. diff --git a/gdb/windows-nat.h b/gdb/windows-nat.h index aa90dfd37d3..2907d97d655 100644 --- a/gdb/windows-nat.h +++ b/gdb/windows-nat.h @@ -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; diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index 180fabe0df9..bf55183f705 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -127,21 +127,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 48ad111ad1a..402254fdad5 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -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;