gdbsupport: allow passing format string to scoped_debug_start_end
[deliverable/binutils-gdb.git] / gdb / i386-bsd-nat.c
index 4e8693246c87088881afd5a361c5803d2743116d..a7c55284e08569af5108ba8440147c6d8ef1efcd 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for modern i386 BSD's.
 
-   Copyright (C) 2000-2020 Free Software Foundation, Inc.
+   Copyright (C) 2000-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -220,7 +220,7 @@ i386bsd_fetch_inferior_registers (struct regcache *regcache, int regnum)
        {
          have_ptrace_xmmregs = 0;
 #endif
-          if (gdb_ptrace (PT_GETFPREGS, ptid,
+         if (gdb_ptrace (PT_GETFPREGS, ptid,
                          (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
            perror_with_name (_("Couldn't get floating point status"));
 
@@ -244,12 +244,12 @@ i386bsd_store_inferior_registers (struct regcache *regcache, int regnum)
       struct reg regs;
 
       if (gdb_ptrace (PT_GETREGS, ptid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't get registers"));
+       perror_with_name (_("Couldn't get registers"));
 
       i386bsd_collect_gregset (regcache, &regs, regnum);
 
       if (gdb_ptrace (PT_SETREGS, ptid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
-        perror_with_name (_("Couldn't write registers"));
+       perror_with_name (_("Couldn't write registers"));
 
       if (regnum != -1)
        return;
@@ -319,23 +319,23 @@ i386bsd_store_inferior_registers (struct regcache *regcache, int regnum)
 
          if (gdb_ptrace (PT_SETXMMREGS, ptid,
                          (PTRACE_TYPE_ARG3) xmmregs, 0) == -1)
-            perror_with_name (_("Couldn't write XMM registers"));
+           perror_with_name (_("Couldn't write XMM registers"));
        }
       else
        {
          have_ptrace_xmmregs = 0;
 #endif
-          if (gdb_ptrace (PT_GETFPREGS, ptid,
+         if (gdb_ptrace (PT_GETFPREGS, ptid,
                          (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
            perror_with_name (_("Couldn't get floating point status"));
 
-          i387_collect_fsave (regcache, regnum, &fpregs);
+         i387_collect_fsave (regcache, regnum, &fpregs);
 
-          if (gdb_ptrace (PT_SETFPREGS, ptid,
+         if (gdb_ptrace (PT_SETFPREGS, ptid,
                          (PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
            perror_with_name (_("Couldn't write floating point status"));
 #ifdef HAVE_PT_GETXMMREGS
-        }
+       }
 #endif
     }
 }
@@ -344,8 +344,6 @@ void _initialize_i386bsd_nat ();
 void
 _initialize_i386bsd_nat ()
 {
-  int offset;
-
   /* To support the recognition of signal handlers, i386-bsd-tdep.c
      hardcodes some constants.  Inclusion of this file means that we
      are compiling a native debugger, which means that we can use the
@@ -356,8 +354,6 @@ _initialize_i386bsd_nat ()
 #define SC_REG_OFFSET i386fbsd4_sc_reg_offset
 #elif defined (__FreeBSD_version) && __FreeBSD_version >= 300005
 #define SC_REG_OFFSET i386fbsd_sc_reg_offset
-#elif defined (NetBSD) || defined (__NetBSD_Version__)
-#define SC_REG_OFFSET i386nbsd_sc_reg_offset
 #elif defined (OpenBSD)
 #define SC_REG_OFFSET i386obsd_sc_reg_offset
 #endif
@@ -376,7 +372,7 @@ _initialize_i386bsd_nat ()
 
   /* Override the default value for the offset of the program counter
      in the sigcontext structure.  */
-  offset = offsetof (struct sigcontext, sc_pc);
+  int offset = offsetof (struct sigcontext, sc_pc);
 
   if (SC_PC_OFFSET != offset)
     {
This page took 0.024731 seconds and 4 git commands to generate.