diff options
Diffstat (limited to 'gdb/mips-linux-nat.c')
-rw-r--r-- | gdb/mips-linux-nat.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c index 9d22773..9596b49 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -34,6 +34,7 @@ #include <sgidefs.h> #include "nat/gdb_ptrace.h" #include <asm/ptrace.h> +#include "inf-ptrace.h" #include "nat/mips-linux-watch.h" @@ -244,9 +245,7 @@ mips64_linux_regsets_fetch_registers (struct target_ops *ops, else is_dsp = 0; - tid = ptid_get_lwp (inferior_ptid); - if (tid == 0) - tid = ptid_get_pid (inferior_ptid); + tid = get_ptrace_pid (regcache_get_ptid (regcache)); if (regno == -1 || (!is_fp && !is_dsp)) { @@ -332,9 +331,7 @@ mips64_linux_regsets_store_registers (struct target_ops *ops, else is_dsp = 0; - tid = ptid_get_lwp (inferior_ptid); - if (tid == 0) - tid = ptid_get_pid (inferior_ptid); + tid = get_ptrace_pid (regcache_get_ptid (regcache)); if (regno == -1 || (!is_fp && !is_dsp)) { |