* target.h (struct regcache): Add forward declaration.
[deliverable/binutils-gdb.git] / gdb / ia64-linux-nat.c
index 8207be41cdecc7b6583ac0495b1641ca3c07758c..dbe6e53c64b352b8603c2efc6c1db4fa5083751c 100644 (file)
@@ -666,7 +666,7 @@ ia64_linux_can_use_hw_breakpoint (int type, int cnt, int othertype)
 /* Fetch register REGNUM from the inferior.  */
 
 static void
-ia64_linux_fetch_register (int regnum)
+ia64_linux_fetch_register (struct regcache *regcache, int regnum)
 {
   CORE_ADDR addr;
   size_t size;
@@ -675,7 +675,7 @@ ia64_linux_fetch_register (int regnum)
 
   if (ia64_cannot_fetch_register (regnum))
     {
-      regcache_raw_supply (current_regcache, regnum, NULL);
+      regcache_raw_supply (regcache, regnum, NULL);
       return;
     }
 
@@ -703,26 +703,26 @@ ia64_linux_fetch_register (int regnum)
 
       addr += sizeof (PTRACE_TYPE_RET);
     }
-  regcache_raw_supply (current_regcache, regnum, buf);
+  regcache_raw_supply (regcache, regnum, buf);
 }
 
 /* Fetch register REGNUM from the inferior.  If REGNUM is -1, do this
    for all registers.  */
 
 static void
-ia64_linux_fetch_registers (int regnum)
+ia64_linux_fetch_registers (struct regcache *regcache, int regnum)
 {
   if (regnum == -1)
     for (regnum = 0; regnum < NUM_REGS; regnum++)
-      ia64_linux_fetch_register (regnum);
+      ia64_linux_fetch_register (regcache, regnum);
   else
-    ia64_linux_fetch_register (regnum);
+    ia64_linux_fetch_register (regcache, regnum);
 }
 
 /* Store register REGNUM into the inferior.  */
 
 static void
-ia64_linux_store_register (int regnum)
+ia64_linux_store_register (const struct regcache *regcache, int regnum)
 {
   CORE_ADDR addr;
   size_t size;
@@ -746,7 +746,7 @@ ia64_linux_store_register (int regnum)
   buf = alloca (size);
 
   /* Write the register contents into the inferior a chunk at a time.  */
-  regcache_raw_collect (current_regcache, regnum, buf);
+  regcache_raw_collect (regcache, regnum, buf);
   for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
     {
       errno = 0;
@@ -763,13 +763,13 @@ ia64_linux_store_register (int regnum)
    this for all registers.  */
 
 static void
-ia64_linux_store_registers (int regnum)
+ia64_linux_store_registers (struct regcache *regcache, int regnum)
 {
   if (regnum == -1)
     for (regnum = 0; regnum < NUM_REGS; regnum++)
-      ia64_linux_store_register (regnum);
+      ia64_linux_store_register (regcache, regnum);
   else
-    ia64_linux_store_register (regnum);
+    ia64_linux_store_register (regcache, regnum);
 }
 
 
This page took 0.024822 seconds and 4 git commands to generate.