Remove gdbserver_windows_process::attaching

Message ID 20260902154241.3495154-1-tromey@adacore.com
State New
Headers
Series Remove gdbserver_windows_process::attaching |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 fail Patch failed to apply

Commit Message

Tom Tromey Sept. 2, 2026, 3:42 p.m. UTC
  Nothing uses the field gdbserver_windows_process::attaching.  This
patch removes it.
---
 gdbserver/win32-low.cc | 6 ------
 gdbserver/win32-low.h  | 2 --
 2 files changed, 8 deletions(-)


base-commit: 49c379f8c2f8ff888b621b4a070dc1976b942577
  

Comments

Pedro Alves Sept. 3, 2026, 11:19 a.m. UTC | #1
Hi,

On 2026-09-02 16:42, Tom Tromey wrote:
> Nothing uses the field gdbserver_windows_process::attaching.  This
> patch removes it.

Approved-By: Pedro Alves <pedro@palves.net>
  

Patch

diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index 13c14a7c69f..5c4505cdaf8 100644
--- a/gdbserver/win32-low.cc
+++ b/gdbserver/win32-low.cc
@@ -517,9 +517,6 @@  win32_process_target::create_inferior (const char *program,
   DWORD err;
   char *args = (char *) program_args.c_str ();
 
-  /* win32_wait needs to know we're not attaching.  */
-  windows_process.attaching = 0;
-
   if (!program)
     error (_("No executable specified, specify executable to debug.\n"));
 
@@ -609,8 +606,6 @@  win32_process_target::attach (unsigned long pid)
 	{
 	  DebugSetProcessKillOnExit (FALSE);
 
-	  /* win32_wait needs to know we're attaching.  */
-	  windows_process.attaching = 1;
 	  do_initial_child_stuff (h, pid, 1);
 	  return 0;
 	}
@@ -988,7 +983,6 @@  get_child_debug_event (DWORD *continue_status,
   /* Check if GDB sent us an interrupt request.  */
   check_remote_input_interrupt_request ();
 
-  windows_process.attaching = 0;
   {
     process_info *proc = find_process_pid (windows_process.process_id);
     for (thread_info &thread : proc->thread_list ())
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h
index 439adb84bc2..a7ef8233321 100644
--- a/gdbserver/win32-low.h
+++ b/gdbserver/win32-low.h
@@ -187,8 +187,6 @@  struct gdbserver_windows_process : public windows_nat::windows_process_info
 
   void fill_thread_context (windows_nat::windows_thread_info *th) override;
 
-  int attaching = 0;
-
   /* A status that hasn't been reported to the core yet, and so
      win32_wait should return it next, instead of fetching the next
      debug event off the win32 API.  */