/* S390 native-dependent code for GDB, the GNU debugger.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2017 Free Software Foundation, Inc.
Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
for IBM Deutschland Entwicklung GmbH, IBM Corporation.
#include <sys/ucontext.h>
#include <elf.h>
#include <algorithm>
+#include "inf-ptrace.h"
/* Per-thread arch-specific data. */
s390_linux_fetch_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
- int tid = s390_inferior_tid ();
+ pid_t tid = get_ptrace_pid (regcache_get_ptid (regcache));
if (regnum == -1 || S390_IS_GREGSET_REGNUM (regnum))
fetch_regs (regcache, tid);
s390_linux_store_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regnum)
{
- int tid = s390_inferior_tid ();
+ pid_t tid = get_ptrace_pid (regcache_get_ptid (regcache));
if (regnum == -1 || S390_IS_GREGSET_REGNUM (regnum))
store_regs (regcache, tid, regnum);