Fix illegal memory accesses trigeered when linking corrupt input files.
[deliverable/binutils-gdb.git] / gdb / ppc-fbsd-nat.c
index ae5877af9f8a7e0e46fb02a4c8cba0550b4f88bb..3afd3e61bb7117703fe7a6afebf16c573db6b6b0 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for PowerPC's running FreeBSD, for GDB.
 
-   Copyright (C) 2013-2017 Free Software Foundation, Inc.
+   Copyright (C) 2013-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -127,7 +127,7 @@ ppcfbsd_fetch_inferior_registers (struct target_ops *ops,
 
   supply_gregset (regcache, &regs);
 
-  if (regno == -1 || getfpregs_supplies (get_regcache_arch (regcache), regno))
+  if (regno == -1 || getfpregs_supplies (regcache->arch (), regno))
     {
       const struct regset *fpregset = ppc_fbsd_fpregset ();
       gdb_fpregset_t fpregs;
@@ -157,7 +157,7 @@ ppcfbsd_store_inferior_registers (struct target_ops *ops,
   if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) &regs, 0) == -1)
     perror_with_name (_("Couldn't write registers"));
 
-  if (regno == -1 || getfpregs_supplies (get_regcache_arch (regcache), regno))
+  if (regno == -1 || getfpregs_supplies (regcache->arch (), regno))
     {
       gdb_fpregset_t fpregs;
 
@@ -178,7 +178,7 @@ ppcfbsd_store_inferior_registers (struct target_ops *ops,
 static int
 ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
 {
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   int i, regnum;
 
@@ -195,10 +195,6 @@ ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
   return 1;
 }
 
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-
-void _initialize_ppcfbsd_nat (void);
-
 void
 _initialize_ppcfbsd_nat (void)
 {
This page took 0.024464 seconds and 4 git commands to generate.