[v5,9/9] Windows gdbserver: Remove win32_target_ops "num_regs" method

Message ID 20261104150749.3118853-9-ssbssa@yahoo.de
State New
Headers
Series [v5,1/9] gdb/testsuite: Add Windows replacement for aligned_alloc |

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 success Test passed

Commit Message

Hannes Domani Nov. 4, 2026, 3:05 p.m. UTC
  It's no longer used since the AVX patch.
---
v4: this patch didn't exist before
v5: no changes
---
 gdbserver/win32-aarch64-low.cc | 10 ----------
 gdbserver/win32-i386-low.cc    | 16 ----------------
 gdbserver/win32-low.cc         |  2 --
 gdbserver/win32-low.h          |  3 ---
 4 files changed, 31 deletions(-)
  

Patch

diff --git a/gdbserver/win32-aarch64-low.cc b/gdbserver/win32-aarch64-low.cc
index e94548b6fef..dfcb940f3e3 100644
--- a/gdbserver/win32-aarch64-low.cc
+++ b/gdbserver/win32-aarch64-low.cc
@@ -394,15 +394,6 @@  aarch64_arch_setup ()
   aarch64_tdesc = std::move (tdesc);
 }
 
-/* Implement win32_target_ops "num_regs" method.  */
-
-static int
-aarch64_win32_num_regs ()
-{
-  int num_regs = sizeof (aarch64_mappings) / sizeof (aarch64_mappings[0]);
-  return num_regs;
-}
-
 /* Implement win32_target_ops "get_pc" method.  */
 
 static CORE_ADDR
@@ -438,7 +429,6 @@  aarch64_is_sw_breakpoint (const EXCEPTION_RECORD *er)
 
 struct win32_target_ops the_low_target = {
   aarch64_arch_setup,
-  aarch64_win32_num_regs,
   aarch64_initial_stuff,
   aarch64_get_thread_context,
   aarch64_prepare_to_resume,
diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc
index c5d9f32f948..0065ca463d0 100644
--- a/gdbserver/win32-i386-low.cc
+++ b/gdbserver/win32-i386-low.cc
@@ -675,21 +675,6 @@  i386_arch_setup (void)
 #endif
 }
 
-/* Implement win32_target_ops "num_regs" method.  */
-
-static int
-i386_win32_num_regs (void)
-{
-  int num_regs;
-#ifdef __x86_64__
-  if (!windows_process.wow64_process)
-    num_regs = sizeof (amd64_mappings) / sizeof (amd64_mappings[0]);
-  else
-#endif
-    num_regs = sizeof (i386_mappings) / sizeof (i386_mappings[0]);
-  return num_regs;
-}
-
 /* Implement win32_target_ops "get_pc" method.  */
 
 static CORE_ADDR
@@ -745,7 +730,6 @@  i386_is_sw_breakpoint (const EXCEPTION_RECORD *er)
 
 struct win32_target_ops the_low_target = {
   i386_arch_setup,
-  i386_win32_num_regs,
   i386_initial_stuff,
   i386_get_thread_context,
   i386_prepare_to_resume,
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index de6d7698b6f..59a2d519e65 100644
--- a/gdbserver/win32-low.cc
+++ b/gdbserver/win32-low.cc
@@ -62,8 +62,6 @@  gdbserver_windows_process windows_process;
 
 int using_threads = 1;
 
-#define NUM_REGS (the_low_target.num_regs ())
-
 /* The current debug event from WaitForDebugEvent.  */
 static ptid_t
 debug_event_ptid (DEBUG_EVENT *event)
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h
index dffa13e31f8..af12805dcfd 100644
--- a/gdbserver/win32-low.h
+++ b/gdbserver/win32-low.h
@@ -37,9 +37,6 @@  struct win32_target_ops
   /* Architecture-specific setup.  */
   void (*arch_setup) (void);
 
-  /* The number of target registers.  */
-  int (*num_regs) (void);
-
   /* Perform initializations on startup.  */
   void (*initial_stuff) (process_info *proc);