X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fppcobsd-nat.c;h=c8e82c38799629cf5f491b3f00eb24b9c6bedab9;hb=20249ae4551ae7b2193caed73d9ce8d594f38754;hp=58ea07d9773dd98fd06bcb1664bdeb691452b26c;hpb=28439f5ef78fd28c36bfc8c4b262f44fdd1ec40f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/ppcobsd-nat.c b/gdb/ppcobsd-nat.c index 58ea07d977..c8e82c3879 100644 --- a/gdb/ppcobsd-nat.c +++ b/gdb/ppcobsd-nat.c @@ -1,7 +1,6 @@ /* Native-dependent code for OpenBSD/powerpc. - Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 - Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of GDB. @@ -23,8 +22,6 @@ #include "inferior.h" #include "regcache.h" -#include "gdb_assert.h" -#include #include #include #include @@ -35,6 +32,7 @@ #include "ppc-tdep.h" #include "ppcobsd-tdep.h" #include "inf-ptrace.h" +#include "obsd-nat.h" #include "bsd-kvm.h" /* OpenBSD/powerpc didn't have PT_GETFPREGS/PT_SETFPREGS until release @@ -78,7 +76,7 @@ ppcobsd_fetch_registers (struct target_ops *ops, { struct reg regs; - if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), + if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid), (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't get registers")); @@ -95,7 +93,7 @@ ppcobsd_fetch_registers (struct target_ops *ops, { struct fpreg fpregs; - if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), + if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid), (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) perror_with_name (_("Couldn't get floating point status")); @@ -114,7 +112,7 @@ ppcobsd_store_registers (struct target_ops *ops, { struct reg regs; - if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), + if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid), (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't get registers")); @@ -125,7 +123,7 @@ ppcobsd_store_registers (struct target_ops *ops, regnum, ®s, sizeof regs); #endif - if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), + if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid), (PTRACE_TYPE_ARG3) ®s, 0) == -1) perror_with_name (_("Couldn't write registers")); @@ -135,14 +133,14 @@ ppcobsd_store_registers (struct target_ops *ops, { struct fpreg fpregs; - if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), + if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid), (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) perror_with_name (_("Couldn't get floating point status")); ppc_collect_fpregset (&ppcobsd_fpregset, regcache, regnum, &fpregs, sizeof fpregs); - if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), + if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid), (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) perror_with_name (_("Couldn't write floating point status")); } @@ -200,7 +198,7 @@ _initialize_ppcobsd_nat (void) t = inf_ptrace_target (); t->to_fetch_registers = ppcobsd_fetch_registers; t->to_store_registers = ppcobsd_store_registers; - add_target (t); + obsd_add_target (t); /* General-purpose registers. */ ppcobsd_reg_offsets.r0_offset = offsetof (struct reg, gpr);