/* Native-dependent code for GNU/Linux on MIPS processors.
- Copyright (C) 2001-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2019 Free Software Foundation, Inc.
This file is part of GDB.
if (have_dsp < 0)
{
- int tid;
-
- tid = ptid_get_lwp (inferior_ptid);
- if (tid == 0)
- tid = inferior_ptid.pid ();
+ int tid = get_ptrace_pid (inferior_ptid);
errno = 0;
ptrace (PTRACE_PEEKUSER, tid, DSP_CONTROL, 0);
int i;
uint32_t wanted_mask, irw_mask;
- if (!mips_linux_read_watch_registers (ptid_get_lwp (inferior_ptid),
+ if (!mips_linux_read_watch_registers (inferior_ptid.lwp (),
&watch_readback,
&watch_readback_valid, 0))
return 0;
int n;
int num_valid;
- if (!mips_linux_read_watch_registers (ptid_get_lwp (inferior_ptid),
+ if (!mips_linux_read_watch_registers (inferior_ptid.lwp (),
&watch_readback,
&watch_readback_valid, 1))
return false;
struct pt_watch_regs dummy_regs;
int i;
- if (!mips_linux_read_watch_registers (ptid_get_lwp (inferior_ptid),
+ if (!mips_linux_read_watch_registers (inferior_ptid.lwp (),
&watch_readback,
&watch_readback_valid, 0))
return 0;
ALL_LWPS (lp)
{
- tid = ptid_get_lwp (lp->ptid);
+ tid = lp->ptid.lwp ();
if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror, NULL) == -1)
perror_with_name (_("Couldn't write debug register"));
}
struct mips_watchpoint *new_watch;
struct mips_watchpoint **pw;
- int i;
int retval;
- if (!mips_linux_read_watch_registers (ptid_get_lwp (inferior_ptid),
+ if (!mips_linux_read_watch_registers (inferior_ptid.lwp (),
&watch_readback,
&watch_readback_valid, 0))
return -1;