[binutils-gdb] Windows gdb: cygwin_set_dr => windows_set_dr, etc.

Pedro Alves via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eb71968d2c48ce7a7376362ccc6b3faa33abc572

commit eb71968d2c48ce7a7376362ccc6b3faa33abc572
Author: Pedro Alves <[email protected]>
Date:   Wed May 17 17:05:43 2023 +0100

    Windows gdb: cygwin_set_dr => windows_set_dr, etc.
    
    The Windows backend functions that manipulate the x86 debug registers
    are called "cygwin_foo", which is outdated, because native MinGW gdb
    also uses those functions, they are not Cygwin-specific.  Rename them
    to "windows_foo" to avoid confusion.
    
    Approved-By: Tom Tromey <[email protected]>
    Change-Id: I46df3b44f5272adadf960da398342a3cbdb98533
    commit-id:896523e0

Diff:
---
 gdb/x86-windows-nat.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/gdb/x86-windows-nat.c b/gdb/x86-windows-nat.c
index baa6b969e99..5c09efce32f 100644
--- a/gdb/x86-windows-nat.c
+++ b/gdb/x86-windows-nat.c
@@ -299,10 +299,10 @@ x86_windows_nat_target::is_sw_breakpoint (const EXCEPTION_RECORD *er) const
    Here we just store the address in dr array, the registers will be
    actually set up when windows_continue is called.  */
 static void
-cygwin_set_dr (int i, CORE_ADDR addr)
+windows_set_dr (int i, CORE_ADDR addr)
 {
   if (i < 0 || i > 3)
-    internal_error (_("Invalid register %d in cygwin_set_dr.\n"), i);
+    internal_error (_("Invalid register %d in windows_set_dr.\n"), i);
 
   for (auto &th : x86_windows_process.thread_list)
     th->debug_registers_changed = true;
@@ -312,7 +312,7 @@ cygwin_set_dr (int i, CORE_ADDR addr)
    register.  Here we just store the address in D_REGS, the watchpoint
    will be actually set up in windows_wait.  */
 static void
-cygwin_set_dr7 (unsigned long val)
+windows_set_dr7 (unsigned long val)
 {
   for (auto &th : x86_windows_process.thread_list)
     th->debug_registers_changed = true;
@@ -321,7 +321,7 @@ cygwin_set_dr7 (unsigned long val)
 /* Get the value of debug register I from the inferior.  */
 
 static CORE_ADDR
-cygwin_get_dr (int i)
+windows_get_dr (int i)
 {
   windows_thread_info *th = windows_process->find_thread (inferior_ptid);
 
@@ -352,18 +352,18 @@ cygwin_get_dr (int i)
    inferior.  */
 
 static unsigned long
-cygwin_get_dr6 (void)
+windows_get_dr6 (void)
 {
-  return cygwin_get_dr (6);
+  return windows_get_dr (6);
 }
 
 /* Get the value of the DR7 debug status register from the
    inferior.  */
 
 static unsigned long
-cygwin_get_dr7 (void)
+windows_get_dr7 (void)
 {
-  return cygwin_get_dr (7);
+  return windows_get_dr (7);
 }
 
 static int
@@ -489,11 +489,11 @@ display_selectors (const char * args, int from_tty)
 
 INIT_GDB_FILE (x86_windows_nat)
 {
-  x86_dr_low.set_control = cygwin_set_dr7;
-  x86_dr_low.set_addr = cygwin_set_dr;
-  x86_dr_low.get_addr = cygwin_get_dr;
-  x86_dr_low.get_status = cygwin_get_dr6;
-  x86_dr_low.get_control = cygwin_get_dr7;
+  x86_dr_low.set_control = windows_set_dr7;
+  x86_dr_low.set_addr = windows_set_dr;
+  x86_dr_low.get_addr = windows_get_dr;
+  x86_dr_low.get_status = windows_get_dr6;
+  x86_dr_low.get_control = windows_get_dr7;
 
   /* x86_dr_low.debug_register_length field is set by
      calling x86_set_debug_register_length function
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.