X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fm32r-linux-nat.c;h=aaedf7fb99296bfbf51d6ad789c4a9739ba96622;hb=f3abeff575541dd80e1facd6d0f920e10f77fede;hp=20420240bac79f695dfff3c2d2dc15c53f234b8c;hpb=56be38147cbe5a85a4d2d4d9cf402696826a4392;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/m32r-linux-nat.c b/gdb/m32r-linux-nat.c index 20420240ba..aaedf7fb99 100644 --- a/gdb/m32r-linux-nat.c +++ b/gdb/m32r-linux-nat.c @@ -1,12 +1,12 @@ /* Native-dependent code for GNU/Linux m32r. - Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of GDB. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -15,9 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ #include "defs.h" #include "inferior.h" @@ -25,10 +23,7 @@ #include "regcache.h" #include "linux-nat.h" #include "target.h" - -#include "gdb_assert.h" -#include "gdb_string.h" -#include +#include "nat/gdb_ptrace.h" #include #include @@ -57,8 +52,9 @@ static int regmap[] = { #define SPU_REGMAP 23 #define SPI_REGMAP 26 -/* Doee apply to the corresponding SET requests as well. */ -#define GETREGS_SUPPLIES(regno) (0 <= (regno) && (regno) <= M32R_LINUX_NUM_REGS) +/* Doee (??) apply to the corresponding SET requests as well. */ +#define GETREGS_SUPPLIES(regno) (0 <= (regno) \ + && (regno) <= M32R_LINUX_NUM_REGS) @@ -195,14 +191,15 @@ fill_fpregset (const struct regcache *regcache, registers). */ static void -m32r_linux_fetch_inferior_registers (struct regcache *regcache, int regno) +m32r_linux_fetch_inferior_registers (struct target_ops *ops, + struct regcache *regcache, int regno) { int tid; /* GNU/Linux LWP ID's are process ID's. */ - tid = TIDGET (inferior_ptid); + tid = ptid_get_lwp (inferior_ptid); if (tid == 0) - tid = PIDGET (inferior_ptid); /* Not a threaded program. */ + tid = ptid_get_pid (inferior_ptid); /* Not a threaded program. */ /* Use the PTRACE_GETREGS request whenever possible, since it transfers more registers in one system call, and we'll cache the @@ -221,13 +218,14 @@ m32r_linux_fetch_inferior_registers (struct regcache *regcache, int regno) do this for all registers (including the floating point and SSE registers). */ static void -m32r_linux_store_inferior_registers (struct regcache *regcache, int regno) +m32r_linux_store_inferior_registers (struct target_ops *ops, + struct regcache *regcache, int regno) { int tid; /* GNU/Linux LWP ID's are process ID's. */ - if ((tid = TIDGET (inferior_ptid)) == 0) - tid = PIDGET (inferior_ptid); /* Not a threaded program. */ + if ((tid = ptid_get_lwp (inferior_ptid)) == 0) + tid = ptid_get_pid (inferior_ptid); /* Not a threaded program. */ /* Use the PTRACE_SETREGS request whenever possible, since it transfers more registers in one system call. */