GDBserver: Don't assume a current process in D;PID implementation (PR gdb/23377)
[deliverable/binutils-gdb.git] / gdb / amd64-linux-nat.c
index 5a39fa87741e8649cfb63b4e670e4e95d47630c9..bc2412b2382cd999eeaea23a1ef664f5240a9d11 100644 (file)
@@ -148,9 +148,9 @@ amd64_linux_nat_target::fetch_registers (struct regcache *regcache, int regnum)
   int tid;
 
   /* GNU/Linux LWP ID's are process ID's.  */
-  tid = ptid_get_lwp (regcache->ptid ());
+  tid = regcache->ptid ().lwp ();
   if (tid == 0)
-    tid = ptid_get_pid (regcache->ptid ()); /* Not a threaded program.  */
+    tid = regcache->ptid ().pid (); /* Not a threaded program.  */
 
   if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
     {
@@ -226,9 +226,9 @@ amd64_linux_nat_target::store_registers (struct regcache *regcache, int regnum)
   int tid;
 
   /* GNU/Linux LWP ID's are process ID's.  */
-  tid = ptid_get_lwp (regcache->ptid ());
+  tid = regcache->ptid ().lwp ();
   if (tid == 0)
-    tid = ptid_get_pid (regcache->ptid ()); /* Not a threaded program.  */
+    tid = regcache->ptid ().pid (); /* Not a threaded program.  */
 
   if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
     {
This page took 0.033478 seconds and 4 git commands to generate.