Convert break-catch-syscall to vtable ops
[binutils-gdb.git] / gdb / i386-linux-nat.c
index abcf72f8989835b55f2be998f6ea048a00ce6bae..e9b0f8a222fa29f5362188624dc926b5154551e6 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux i386.
 
-   Copyright (C) 1999-2019 Free Software Foundation, Inc.
+   Copyright (C) 1999-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,7 +31,7 @@
 #include "i387-tdep.h"
 #include "i386-tdep.h"
 #include "i386-linux-tdep.h"
-#include "common/x86-xstate.h"
+#include "gdbsupport/x86-xstate.h"
 
 #include "x86-linux-nat.h"
 #include "nat/linux-ptrace.h"
@@ -215,7 +215,7 @@ fetch_regs (struct regcache *regcache, int tid)
       if (errno == EIO)
        {
          /* The kernel we're running on doesn't support the GETREGS
-             request.  Reset `have_ptrace_getregs'.  */
+            request.  Reset `have_ptrace_getregs'.  */
          have_ptrace_getregs = 0;
          return;
        }
@@ -657,7 +657,7 @@ i386_linux_nat_target::low_resume (ptid_t ptid, int step, enum gdb_signal signal
 
   if (step)
     {
-      struct regcache *regcache = get_thread_regcache (ptid);
+      struct regcache *regcache = get_thread_regcache (this, ptid);
       struct gdbarch *gdbarch = regcache->arch ();
       enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
       ULONGEST pc;
@@ -669,12 +669,12 @@ i386_linux_nat_target::low_resume (ptid_t ptid, int step, enum gdb_signal signal
                                     gdbarch_pc_regnum (gdbarch), &pc);
 
       /* Returning from a signal trampoline is done by calling a
-         special system call (sigreturn or rt_sigreturn, see
-         i386-linux-tdep.c for more information).  This system call
-         restores the registers that were saved when the signal was
-         raised, including %eflags.  That means that single-stepping
-         won't work.  Instead, we'll have to modify the signal context
-         that's about to be restored, and set the trace flag there.  */
+        special system call (sigreturn or rt_sigreturn, see
+        i386-linux-tdep.c for more information).  This system call
+        restores the registers that were saved when the signal was
+        raised, including %eflags.  That means that single-stepping
+        won't work.  Instead, we'll have to modify the signal context
+        that's about to be restored, and set the trace flag there.  */
 
       /* First check if PC is at a system call.  */
       if (target_read_memory (pc, buf, LINUX_SYSCALL_LEN) == 0
@@ -698,7 +698,7 @@ i386_linux_nat_target::low_resume (ptid_t ptid, int step, enum gdb_signal signal
                addr = sp;
 
              /* Set the trace flag in the context that's about to be
-                 restored.  */
+                restored.  */
              addr += LINUX_SIGCONTEXT_EFLAGS_OFFSET;
              read_memory (addr, (gdb_byte *) &eflags, 4);
              eflags |= 0x0100;
@@ -711,8 +711,9 @@ i386_linux_nat_target::low_resume (ptid_t ptid, int step, enum gdb_signal signal
     perror_with_name (("ptrace"));
 }
 
+void _initialize_i386_linux_nat ();
 void
-_initialize_i386_linux_nat (void)
+_initialize_i386_linux_nat ()
 {
   linux_target = &the_i386_linux_nat_target;