/* Generic GNU/Linux target using traditional ptrace register access.
- Copyright (C) 1988-2018 Free Software Foundation, Inc.
+ Copyright (C) 1988-2020 Free Software Foundation, Inc.
This file is part of GDB.
#include "nat/gdb_ptrace.h"
#include "inf-ptrace.h"
+#include "gdbarch.h"
/* Fetch register REGNUM from the inferior. */
if (addr == (CORE_ADDR)-1
|| gdbarch_cannot_fetch_register (gdbarch, regnum))
{
- regcache_raw_supply (regcache, regnum, NULL);
+ regcache->raw_supply (regnum, NULL);
return;
}
- pid = get_ptrace_pid (regcache_get_ptid (regcache));
+ pid = get_ptrace_pid (regcache->ptid ());
size = register_size (gdbarch, regnum);
buf = (gdb_byte *) alloca (size);
addr += sizeof (PTRACE_TYPE_RET);
}
- regcache_raw_supply (regcache, regnum, buf);
+ regcache->raw_supply (regnum, buf);
}
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
|| gdbarch_cannot_store_register (gdbarch, regnum))
return;
- pid = get_ptrace_pid (regcache_get_ptid (regcache));
+ pid = get_ptrace_pid (regcache->ptid ());
size = register_size (gdbarch, regnum);
buf = (gdb_byte *) alloca (size);
/* Write the register contents into the inferior a chunk at a time. */
- regcache_raw_collect (regcache, regnum, buf);
+ regcache->raw_collect (regnum, buf);
for (i = 0; i < size; i += sizeof (PTRACE_TYPE_RET))
{
size_t chunk = std::min (sizeof (PTRACE_TYPE_RET), size - i);