aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-linux-nat.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@mips.com>2018-07-20 17:28:08 +0100
committerMaciej W. Rozycki <macro@mips.com>2018-07-20 17:28:08 +0100
commit2d38991535ecfcd092f3c57da84844efc3d49877 (patch)
treef443f70579c7d2c84b6970be2233955adf563821 /gdb/mips-linux-nat.c
parent241e64e3b42cd9eba514b8e0ad2ef39a337f10a5 (diff)
downloadgdb-2d38991535ecfcd092f3c57da84844efc3d49877.zip
gdb-2d38991535ecfcd092f3c57da84844efc3d49877.tar.gz
gdb-2d38991535ecfcd092f3c57da84844efc3d49877.tar.bz2
MIPS/Linux/native: Convert to `get_ptrace_pid' for PID extraction
Use `get_ptrace_pid' to get the ptrace PID from `inferior_ptid' rather than extracting it by hand. gdb/ * mips-linux-nat.c (mips_linux_nat_target::read_description): Call `get_ptrace_pid' rather than extracting the ptrace PID by hand.
Diffstat (limited to 'gdb/mips-linux-nat.c')
-rw-r--r--gdb/mips-linux-nat.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 21b1f58..e37fa4d 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -458,11 +458,7 @@ mips_linux_nat_target::read_description ()
if (have_dsp < 0)
{
- int tid;
-
- tid = inferior_ptid.lwp ();
- if (tid == 0)
- tid = inferior_ptid.pid ();
+ int tid = get_ptrace_pid (inferior_ptid);
errno = 0;
ptrace (PTRACE_PEEKUSER, tid, DSP_CONTROL, 0);