Don't write to inferior_ptid in go32-nat.c
[deliverable/binutils-gdb.git] / gdb / nat / x86-linux-dregs.c
index 8aa87171635f68ce87fb9bfe180c8c7383f6fd95..b5dd71e3c7ca2fc4ac73571e91fc0912583165dc 100644 (file)
@@ -1,6 +1,6 @@
 /* Low-level debug register code for GNU/Linux x86 (i386 and x86-64).
 
-   Copyright (C) 1999-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,7 +17,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "common-defs.h"
+#include "gdbsupport/common-defs.h"
 #include "nat/gdb_ptrace.h"
 #include <sys/user.h>
 #include "target/waitstatus.h"
@@ -43,7 +43,7 @@ x86_linux_dr_get (ptid_t ptid, int regnum)
   int tid;
   unsigned long value;
 
-  gdb_assert (ptid_lwp_p (ptid));
+  gdb_assert (ptid.lwp_p ());
   tid = ptid.lwp ();
 
   errno = 0;
@@ -61,7 +61,7 @@ x86_linux_dr_set (ptid_t ptid, int regnum, unsigned long value)
 {
   int tid;
 
-  gdb_assert (ptid_lwp_p (ptid));
+  gdb_assert (ptid.lwp_p ());
   tid = ptid.lwp ();
 
   errno = 0;
@@ -76,7 +76,7 @@ x86_linux_dr_set (ptid_t ptid, int regnum, unsigned long value)
    the actual debug registers immediately prior to LWP resuming.  */
 
 static int
-update_debug_registers_callback (struct lwp_info *lwp, void *arg)
+update_debug_registers_callback (struct lwp_info *lwp)
 {
   lwp_set_debug_registers_changed (lwp, 1);
 
@@ -106,7 +106,7 @@ x86_linux_dr_set_addr (int regnum, CORE_ADDR addr)
 
   gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
 
-  iterate_over_lwps (pid_ptid, update_debug_registers_callback, NULL);
+  iterate_over_lwps (pid_ptid, update_debug_registers_callback);
 }
 
 /* See nat/x86-linux-dregs.h.  */
@@ -124,7 +124,7 @@ x86_linux_dr_set_control (unsigned long control)
 {
   ptid_t pid_ptid = ptid_t (current_lwp_ptid ().pid ());
 
-  iterate_over_lwps (pid_ptid, update_debug_registers_callback, NULL);
+  iterate_over_lwps (pid_ptid, update_debug_registers_callback);
 }
 
 /* See nat/x86-linux-dregs.h.  */
This page took 0.02549 seconds and 4 git commands to generate.