Remove ptid_get_pid
[deliverable/binutils-gdb.git] / gdb / arm-linux-nat.c
index a1bef7a4e235c6b4196ef9333ca940d4a7fa5f53..8f9416e66848b71c2f53cbafe52418cfe743b92a 100644 (file)
@@ -138,8 +138,7 @@ fetch_fpregs (struct regcache *regcache)
     perror_with_name (_("Unable to fetch the floating point registers."));
 
   /* Fetch fpsr.  */
-  regcache_raw_supply (regcache, ARM_FPS_REGNUM,
-                      fp + NWFPE_FPSR_OFFSET);
+  regcache->raw_supply (ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
 
   /* Fetch the floating point registers.  */
   for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
@@ -177,7 +176,7 @@ store_fpregs (const struct regcache *regcache)
 
   /* Store fpsr.  */
   if (REG_VALID == regcache->get_register_status (ARM_FPS_REGNUM))
-    regcache_raw_collect (regcache, ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
+    regcache->raw_collect (ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
 
   /* Store the floating point registers.  */
   for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
@@ -292,16 +291,15 @@ fetch_wmmx_regs (struct regcache *regcache)
     perror_with_name (_("Unable to fetch WMMX registers."));
 
   for (regno = 0; regno < 16; regno++)
-    regcache_raw_supply (regcache, regno + ARM_WR0_REGNUM,
-                        &regbuf[regno * 8]);
+    regcache->raw_supply (regno + ARM_WR0_REGNUM, &regbuf[regno * 8]);
 
   for (regno = 0; regno < 2; regno++)
-    regcache_raw_supply (regcache, regno + ARM_WCSSF_REGNUM,
-                        &regbuf[16 * 8 + regno * 4]);
+    regcache->raw_supply (regno + ARM_WCSSF_REGNUM,
+                         &regbuf[16 * 8 + regno * 4]);
 
   for (regno = 0; regno < 4; regno++)
-    regcache_raw_supply (regcache, regno + ARM_WCGR0_REGNUM,
-                        &regbuf[16 * 8 + 2 * 4 + regno * 4]);
+    regcache->raw_supply (regno + ARM_WCGR0_REGNUM,
+                         &regbuf[16 * 8 + 2 * 4 + regno * 4]);
 }
 
 static void
@@ -319,18 +317,17 @@ store_wmmx_regs (const struct regcache *regcache)
 
   for (regno = 0; regno < 16; regno++)
     if (REG_VALID == regcache->get_register_status (regno + ARM_WR0_REGNUM))
-      regcache_raw_collect (regcache, regno + ARM_WR0_REGNUM,
-                           &regbuf[regno * 8]);
+      regcache->raw_collect (regno + ARM_WR0_REGNUM, &regbuf[regno * 8]);
 
   for (regno = 0; regno < 2; regno++)
     if (REG_VALID == regcache->get_register_status (regno + ARM_WCSSF_REGNUM))
-      regcache_raw_collect (regcache, regno + ARM_WCSSF_REGNUM,
-                           &regbuf[16 * 8 + regno * 4]);
+      regcache->raw_collect (regno + ARM_WCSSF_REGNUM,
+                            &regbuf[16 * 8 + regno * 4]);
 
   for (regno = 0; regno < 4; regno++)
     if (REG_VALID == regcache->get_register_status (regno + ARM_WCGR0_REGNUM))
-      regcache_raw_collect (regcache, regno + ARM_WCGR0_REGNUM,
-                           &regbuf[16 * 8 + 2 * 4 + regno * 4]);
+      regcache->raw_collect (regno + ARM_WCGR0_REGNUM,
+                            &regbuf[16 * 8 + 2 * 4 + regno * 4]);
 
   ret = ptrace (PTRACE_SETWMMXREGS, tid, 0, regbuf);
 
@@ -556,7 +553,7 @@ arm_linux_nat_target::read_description ()
 
   if (target_auxv_search (this, AT_HWCAP, &arm_hwcap) != 1)
     {
-      return this->beneath->read_description ();
+      return this->beneath ()->read_description ();
     }
 
   if (arm_hwcap & HWCAP_IWMMXT)
@@ -589,7 +586,7 @@ arm_linux_nat_target::read_description ()
       return result;
     }
 
-  return this->beneath->read_description ();
+  return this->beneath ()->read_description ();
 }
 
 /* Information describing the hardware breakpoint capabilities.  */
@@ -996,8 +993,8 @@ arm_linux_insert_hw_breakpoint1 (const struct arm_linux_hw_breakpoint* bpt,
   struct arm_linux_hw_breakpoint* bpts;
   struct update_registers_data data;
 
-  pid = ptid_get_pid (inferior_ptid);
-  pid_ptid = pid_to_ptid (pid);
+  pid = inferior_ptid.pid ();
+  pid_ptid = ptid_t (pid);
 
   if (watchpoint)
     {
@@ -1035,8 +1032,8 @@ arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt,
   struct arm_linux_hw_breakpoint* bpts;
   struct update_registers_data data;
 
-  pid = ptid_get_pid (inferior_ptid);
-  pid_ptid = pid_to_ptid (pid);
+  pid = inferior_ptid.pid ();
+  pid_ptid = ptid_t (pid);
 
   if (watchpoint)
     {
@@ -1254,8 +1251,8 @@ arm_linux_nat_target::low_prepare_to_resume (struct lwp_info *lwp)
   struct arch_lwp_info *arm_lwp_info = lwp->arch_private;
 
   pid = ptid_get_lwp (lwp->ptid);
-  bpts = arm_linux_get_debug_reg_state (ptid_get_pid (lwp->ptid))->bpts;
-  wpts = arm_linux_get_debug_reg_state (ptid_get_pid (lwp->ptid))->wpts;
+  bpts = arm_linux_get_debug_reg_state (lwp->ptid.pid ())->bpts;
+  wpts = arm_linux_get_debug_reg_state (lwp->ptid.pid ())->wpts;
 
   /* NULL means this is the main thread still going through the shell,
      or, no watchpoint has been set yet.  In that case, there's
@@ -1318,7 +1315,7 @@ arm_linux_nat_target::low_new_fork (struct lwp_info *parent, pid_t child_pid)
      new process so that all breakpoints and watchpoints can be
      removed together.  */
 
-  parent_pid = ptid_get_pid (parent->ptid);
+  parent_pid = parent->ptid.pid ();
   parent_state = arm_linux_get_debug_reg_state (parent_pid);
   child_state = arm_linux_get_debug_reg_state (child_pid);
   *child_state = *parent_state;
This page took 0.026643 seconds and 4 git commands to generate.