/* IBM RS/6000 native-dependent code for GDB, the GNU debugger.
- Copyright (C) 1986-2018 Free Software Foundation, Inc.
+ Copyright (C) 1986-2020 Free Software Foundation, Inc.
This file is part of GDB.
struct gdbarch *gdbarch = regcache->arch ();
int addr[PPC_MAX_REGISTER_SIZE];
int nr, isfloat;
- pid_t pid = ptid_get_pid (regcache->ptid ());
+ pid_t pid = regcache->ptid ().pid ();
/* Retrieved values may be -1, so infer errors from errno. */
errno = 0;
}
if (!errno)
- regcache_raw_supply (regcache, regno, (char *) addr);
+ regcache->raw_supply (regno, (char *) addr);
else
{
#if 0
struct gdbarch *gdbarch = regcache->arch ();
int addr[PPC_MAX_REGISTER_SIZE];
int nr, isfloat;
- pid_t pid = ptid_get_pid (regcache->ptid ());
+ pid_t pid = regcache->ptid ().pid ();
/* Fetch the register's value from the register cache. */
- regcache_raw_collect (regcache, regno, addr);
+ regcache->raw_collect (regno, addr);
/* -1 can be a successful return value, so infer errors from errno. */
errno = 0;
ULONGEST offset, ULONGEST len,
ULONGEST *xfered_len)
{
- pid_t pid = ptid_get_pid (inferior_ptid);
+ pid_t pid = inferior_ptid.pid ();
int arch64 = ARCH64 ();
switch (object)
do
{
- pid = waitpid (ptid_get_pid (ptid), &status, 0);
+ pid = waitpid (ptid.pid (), &status, 0);
save_errno = errno;
}
while (pid == -1 && errno == EINTR);
}
/* Ignore terminated detached child processes. */
- if (!WIFSTOPPED (status) && pid != ptid_get_pid (inferior_ptid))
+ if (!WIFSTOPPED (status) && pid != inferior_ptid.pid ())
pid = -1;
}
while (pid == -1);
else
store_waitstatus (ourstatus, status);
- return pid_to_ptid (pid);
+ return ptid_t (pid);
}
\f
static gdb::byte_vector
rs6000_ptrace_ldinfo (ptid_t ptid)
{
- const int pid = ptid_get_pid (ptid);
+ const int pid = ptid.pid ();
gdb::byte_vector ldi (1024);
int rc = -1;