diff options
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index 2269016..b860f16 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -3219,15 +3219,16 @@ procfs_fetch_registers (struct target_ops *ops, { gdb_gregset_t *gregs; procinfo *pi; - int pid = ptid_get_pid (inferior_ptid); - int tid = ptid_get_lwp (inferior_ptid); + ptid_t ptid = regcache_get_ptid (regcache); + int pid = ptid_get_pid (ptid); + int tid = ptid_get_lwp (ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); pi = find_procinfo_or_die (pid, tid); if (pi == NULL) error (_("procfs: fetch_registers failed to find procinfo for %s"), - target_pid_to_str (inferior_ptid)); + target_pid_to_str (ptid)); gregs = proc_get_gregs (pi); if (gregs == NULL) @@ -3268,15 +3269,16 @@ procfs_store_registers (struct target_ops *ops, { gdb_gregset_t *gregs; procinfo *pi; - int pid = ptid_get_pid (inferior_ptid); - int tid = ptid_get_lwp (inferior_ptid); + ptid_t ptid = regcache_get_ptid (regcache); + int pid = ptid_get_pid (ptid); + int tid = ptid_get_lwp (ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); pi = find_procinfo_or_die (pid, tid); if (pi == NULL) error (_("procfs: store_registers: failed to find procinfo for %s"), - target_pid_to_str (inferior_ptid)); + target_pid_to_str (ptid)); gregs = proc_get_gregs (pi); if (gregs == NULL) |