]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove regcache_cooked_read
authorSimon Marchi <simon.marchi@ericsson.com>
Wed, 30 May 2018 18:54:38 +0000 (14:54 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Wed, 30 May 2018 18:54:38 +0000 (14:54 -0400)
Remove regcache_cooked_read, update callers to use
readable_regcache::cooked_read instead.

gdb/ChangeLog:

* regcache.h (regcache_cooked_read): Remove, update callers to
use readable_regcache::cooked_read instead.
* regcache.c (regcache_cooked_read): Remove.

31 files changed:
gdb/ChangeLog
gdb/aarch64-linux-tdep.c
gdb/aarch64-tdep.c
gdb/alpha-tdep.c
gdb/amd64-linux-tdep.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/bfin-linux-tdep.c
gdb/hppa-tdep.c
gdb/i386-linux-tdep.c
gdb/ia64-tdep.c
gdb/microblaze-tdep.c
gdb/mips-linux-tdep.c
gdb/nds32-tdep.c
gdb/nios2-tdep.c
gdb/ppc-linux-tdep.c
gdb/ppc-sysv-tdep.c
gdb/record-full.c
gdb/regcache.c
gdb/regcache.h
gdb/riscv-tdep.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-lynx178-tdep.c
gdb/s390-tdep.c
gdb/sparc-linux-tdep.c
gdb/sparc-tdep.c
gdb/sparc64-linux-tdep.c
gdb/sparc64-tdep.c
gdb/spu-tdep.c
gdb/tic6x-tdep.c
gdb/vax-tdep.c

index 7142237acead828f05b2601894a107cfa4c9b237..98b80d3d5650df0ae0fe0085d284725d276244e1 100644 (file)
@@ -1,3 +1,9 @@
+2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * regcache.h (regcache_cooked_read): Remove, update callers to
+       use readable_regcache::cooked_read instead.
+       * regcache.c (regcache_cooked_read): Remove.
+
 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
 
        * regcache.h (regcache_raw_write): Remove, update callers to use
index ba5757d276b42a0cb4b0034d4327560f1fe92244..eccefd9c9ae96bf27973857fe49aa99ea5a1196a 100644 (file)
@@ -376,7 +376,7 @@ aarch64_linux_get_syscall_number (struct gdbarch *gdbarch,
   LONGEST ret;
 
   /* Getting the system call number from the register x8.  */
-  regcache_cooked_read (regs, AARCH64_DWARF_X0 + 8, buf);
+  regs->cooked_read (AARCH64_DWARF_X0 + 8, buf);
 
   ret = extract_signed_integer (buf, X_REGISTER_SIZE, byte_order);
 
index 8e16e3df8c8c03097da7f9a85b87190e69702d15..6f4878a1c4e7729473d336d06d5ae8031ef94bf4 100644 (file)
@@ -1792,7 +1792,7 @@ aarch64_extract_return_value (struct type *type, struct regcache *regs,
       bfd_byte buf[V_REGISTER_SIZE];
       int len = TYPE_LENGTH (type);
 
-      regcache_cooked_read (regs, AARCH64_V0_REGNUM, buf);
+      regs->cooked_read (AARCH64_V0_REGNUM, buf);
       memcpy (valbuf, buf, len);
     }
   else if (TYPE_CODE (type) == TYPE_CODE_INT
@@ -1828,10 +1828,10 @@ aarch64_extract_return_value (struct type *type, struct regcache *regs,
       struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type));
       int len = TYPE_LENGTH (target_type);
 
-      regcache_cooked_read (regs, regno, buf);
+      regs->cooked_read (regno, buf);
       memcpy (valbuf, buf, len);
       valbuf += len;
-      regcache_cooked_read (regs, regno + 1, buf);
+      regs->cooked_read (regno + 1, buf);
       memcpy (valbuf, buf, len);
       valbuf += len;
     }
@@ -1853,7 +1853,7 @@ aarch64_extract_return_value (struct type *type, struct regcache *regs,
                            i + 1,
                            gdbarch_register_name (gdbarch, regno));
            }
-         regcache_cooked_read (regs, regno, buf);
+         regs->cooked_read (regno, buf);
 
          memcpy (valbuf, buf, len);
          valbuf += len;
@@ -1865,7 +1865,7 @@ aarch64_extract_return_value (struct type *type, struct regcache *regs,
       /* Short vector is returned in V register.  */
       gdb_byte buf[V_REGISTER_SIZE];
 
-      regcache_cooked_read (regs, AARCH64_V0_REGNUM, buf);
+      regs->cooked_read (AARCH64_V0_REGNUM, buf);
       memcpy (valbuf, buf, TYPE_LENGTH (type));
     }
   else
@@ -1879,7 +1879,7 @@ aarch64_extract_return_value (struct type *type, struct regcache *regs,
 
       while (len > 0)
        {
-         regcache_cooked_read (regs, regno++, buf);
+         regs->cooked_read (regno++, buf);
          memcpy (valbuf, buf, len > X_REGISTER_SIZE ? X_REGISTER_SIZE : len);
          len -= X_REGISTER_SIZE;
          valbuf += X_REGISTER_SIZE;
index 78422faa6c09c24810414d1b9c0454629aca6810..d55f3c6a5d24eecc2d4d0e00451752cf3b17b327 100644 (file)
@@ -483,12 +483,12 @@ alpha_extract_return_value (struct type *valtype, struct regcache *regcache,
       switch (TYPE_LENGTH (valtype))
        {
        case 4:
-         regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, raw_buffer);
+         regcache->cooked_read (ALPHA_FP0_REGNUM, raw_buffer);
          alpha_sts (gdbarch, valbuf, raw_buffer);
          break;
 
        case 8:
-         regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+         regcache->cooked_read (ALPHA_FP0_REGNUM, valbuf);
          break;
 
        case 16:
@@ -507,12 +507,12 @@ alpha_extract_return_value (struct type *valtype, struct regcache *regcache,
        {
        case 8:
          /* ??? This isn't correct wrt the ABI, but it's what GCC does.  */
-         regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+         regcache->cooked_read (ALPHA_FP0_REGNUM, valbuf);
          break;
 
        case 16:
-         regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
-         regcache_cooked_read (regcache, ALPHA_FP0_REGNUM + 1, valbuf + 8);
+         regcache->cooked_read (ALPHA_FP0_REGNUM, valbuf);
+         regcache->cooked_read (ALPHA_FP0_REGNUM + 1, valbuf + 8);
          break;
 
        case 32:
index 2bd3d31b75259d694c3375cc4bda2db85ee06e57..521e32a9c243fe6a1c8b6c2350f7a7cdde71fd3f 100644 (file)
@@ -234,7 +234,7 @@ amd64_linux_get_syscall_number (struct gdbarch *gdbarch,
   /* Getting the system call number from the register.
      When dealing with x86_64 architecture, this information
      is stored at %rax register.  */
-  regcache_cooked_read (regcache, AMD64_LINUX_ORIG_RAX_REGNUM, buf);
+  regcache->cooked_read (AMD64_LINUX_ORIG_RAX_REGNUM, buf);
 
   ret = extract_signed_integer (buf, 8, byte_order);
 
index 4eeb6ea0b7fb3fd59dfaaeac5b974cee5126c54a..abb1a88bfac70b757c85093599e0f01a2b3139d4 100644 (file)
@@ -7893,7 +7893,7 @@ arm_extract_return_value (struct type *type, struct regcache *regs,
               internal type.  */
            bfd_byte tmpbuf[FP_REGISTER_SIZE];
 
-           regcache_cooked_read (regs, ARM_F0_REGNUM, tmpbuf);
+           regs->cooked_read (ARM_F0_REGNUM, tmpbuf);
            target_float_convert (tmpbuf, arm_ext_type (gdbarch),
                                  valbuf, type);
          }
@@ -7904,10 +7904,9 @@ arm_extract_return_value (struct type *type, struct regcache *regs,
          /* ARM_FLOAT_VFP can arise if this is a variadic function so
             not using the VFP ABI code.  */
        case ARM_FLOAT_VFP:
-         regcache_cooked_read (regs, ARM_A1_REGNUM, valbuf);
+         regs->cooked_read (ARM_A1_REGNUM, valbuf);
          if (TYPE_LENGTH (type) > 4)
-           regcache_cooked_read (regs, ARM_A1_REGNUM + 1,
-                                 valbuf + INT_REGISTER_SIZE);
+           regs->cooked_read (ARM_A1_REGNUM + 1, valbuf + INT_REGISTER_SIZE);
          break;
 
        default:
@@ -7955,7 +7954,7 @@ arm_extract_return_value (struct type *type, struct regcache *regs,
 
       while (len > 0)
        {
-         regcache_cooked_read (regs, regno++, tmpbuf);
+         regs->cooked_read (regno++, tmpbuf);
          memcpy (valbuf, tmpbuf,
                  len > INT_REGISTER_SIZE ? INT_REGISTER_SIZE : len);
          len -= INT_REGISTER_SIZE;
@@ -8217,8 +8216,7 @@ arm_return_value (struct gdbarch *gdbarch, struct value *function,
                regcache_cooked_write (regcache, regnum,
                                       writebuf + i * unit_length);
              if (readbuf)
-               regcache_cooked_read (regcache, regnum,
-                                     readbuf + i * unit_length);
+               regcache->cooked_read (regnum, readbuf + i * unit_length);
            }
        }
       return RETURN_VALUE_REGISTER_CONVENTION;
index 5aa61ba2d9e7de24c32447c3814e1e860fbd5063..2629d54d457299a04253a3681b492353304b3ca9 100644 (file)
@@ -959,7 +959,7 @@ avr_return_value (struct gdbarch *gdbarch, struct value *function,
   if (readbuf != NULL)
     {
       for (i = 0; i < TYPE_LENGTH (valtype); i++)
-        regcache_cooked_read (regcache, lsb_reg + i, readbuf + i);
+       regcache->cooked_read (lsb_reg + i, readbuf + i);
     }
 
   return RETURN_VALUE_REGISTER_CONVENTION;
index 9b9f3bedfb1c86c06337d317d45c3bb188cc8316..f84e2e0fc5f8d58643e486c1917de479319c18bb 100644 (file)
@@ -140,7 +140,7 @@ bfin_linux_get_syscall_number (struct gdbarch *gdbarch,
   /* Getting the system call number from the register.
      When dealing with Blackfin architecture, this information
      is stored at %p0 register.  */
-  regcache_cooked_read (regcache, BFIN_P0_REGNUM, buf);
+  regcache->cooked_read (BFIN_P0_REGNUM, buf);
 
   ret = extract_signed_integer (buf, 4, byte_order);
 
index 9692b33e097b38ff80de8fd5faed2c26fea49be4..5fe7851afeb2fa0d56d635d534c856a036104306 100644 (file)
@@ -1165,7 +1165,7 @@ hppa32_return_value (struct gdbarch *gdbarch, struct value *function,
       for (b = part; b < TYPE_LENGTH (type); b += 4)
        {
          if (readbuf != NULL)
-           regcache_cooked_read (regcache, reg, readbuf + b);
+           regcache->cooked_read (reg, readbuf + b);
          if (writebuf != NULL)
            regcache_cooked_write (regcache, reg, writebuf + b);
          reg++;
index c7b6d5262e165a1a59792faa44daa69a46a17acc..1919c8b8cf8102d6af4275e0cad4b3f53893c2d5 100644 (file)
@@ -547,7 +547,7 @@ i386_linux_get_syscall_number_from_regcache (struct regcache *regcache)
   /* Getting the system call number from the register.
      When dealing with x86 architecture, this information
      is stored at %eax register.  */
-  regcache_cooked_read (regcache, I386_LINUX_ORIG_EAX_REGNUM, buf);
+  regcache->cooked_read (I386_LINUX_ORIG_EAX_REGNUM, buf);
 
   ret = extract_signed_integer (buf, 4, byte_order);
 
index 26e112e7bc5abeb05ae63b917a45b44f3d9e9af1..7eb84ff02b25c9295f1bf9eecd595c781e6ee917 100644 (file)
@@ -2616,7 +2616,7 @@ ia64_access_rse_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
   /* We never call any libunwind routines that need to write registers.  */
   gdb_assert (!write);
 
-  regcache_cooked_read (regcache, regnum, (gdb_byte *) val);
+  regcache->cooked_read (regnum, (gdb_byte *) val);
 
   return 0;
 }
@@ -3210,7 +3210,7 @@ ia64_extract_return_value (struct type *type, struct regcache *regcache,
 
       while (n-- > 0)
        {
-         regcache_cooked_read (regcache, regnum, from);
+         regcache->cooked_read (regnum, from);
          target_float_convert (from, ia64_ext_type (gdbarch),
                                valbuf + offset, float_elt_type);
          offset += TYPE_LENGTH (float_elt_type);
index 0cb963380150751792108a0183601da22b526023..f5035904aec2c4da6ad8a05282218488a832b515 100644 (file)
@@ -529,17 +529,17 @@ microblaze_extract_return_value (struct type *type, struct regcache *regcache,
   switch (TYPE_LENGTH (type))
     {
       case 1:  /* return last byte in the register.  */
-       regcache_cooked_read (regcache, MICROBLAZE_RETVAL_REGNUM, buf);
+       regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM, buf);
        memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 1, 1);
        return;
       case 2:  /* return last 2 bytes in register.  */
-       regcache_cooked_read (regcache, MICROBLAZE_RETVAL_REGNUM, buf);
+       regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM, buf);
        memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 2, 2);
        return;
       case 4:  /* for sizes 4 or 8, copy the required length.  */
       case 8:
-       regcache_cooked_read (regcache, MICROBLAZE_RETVAL_REGNUM, buf);
-       regcache_cooked_read (regcache, MICROBLAZE_RETVAL_REGNUM+1, buf+4);
+       regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM, buf);
+       regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM + 1, buf+4);
        memcpy (valbuf, buf, TYPE_LENGTH (type));
        return;
       default:
index e5804246855939039ff270c65897e13e8e7b40f0..84cc4058daca70cc1ddb638d0e9e65589ae5d30b 100644 (file)
@@ -1337,7 +1337,7 @@ mips_linux_get_syscall_number (struct gdbarch *gdbarch,
 
   /* Getting the system call number from the register.
      syscall number is in v0 or $2.  */
-  regcache_cooked_read (regcache, MIPS_V0_REGNUM, buf);
+  regcache->cooked_read (MIPS_V0_REGNUM, buf);
 
   ret = extract_signed_integer (buf, regsize, byte_order);
 
index 14b091c0b5914df4048960e260b6390619736b46..35375fb1eeb18eb60d269839d12bdc89e10eb7e7 100644 (file)
@@ -1740,9 +1740,9 @@ nds32_extract_return_value (struct gdbarch *gdbarch, struct type *type,
   if (abi_use_fpr && calling_use_fpr)
     {
       if (len == 4)
-       regcache_cooked_read (regcache, tdep->fs0_regnum, valbuf);
+       regcache->cooked_read (tdep->fs0_regnum, valbuf);
       else if (len == 8)
-       regcache_cooked_read (regcache, NDS32_FD0_REGNUM, valbuf);
+       regcache->cooked_read (NDS32_FD0_REGNUM, valbuf);
       else
        internal_error (__FILE__, __LINE__,
                        _("Cannot extract return value of %d bytes "
@@ -1788,7 +1788,7 @@ nds32_extract_return_value (struct gdbarch *gdbarch, struct type *type,
        }
       else if (len == 4)
        {
-         regcache_cooked_read (regcache, NDS32_R0_REGNUM, valbuf);
+         regcache->cooked_read (NDS32_R0_REGNUM, valbuf);
        }
       else if (len < 8)
        {
@@ -1805,8 +1805,8 @@ nds32_extract_return_value (struct gdbarch *gdbarch, struct type *type,
        }
       else
        {
-         regcache_cooked_read (regcache, NDS32_R0_REGNUM, valbuf);
-         regcache_cooked_read (regcache, NDS32_R0_REGNUM + 1, valbuf + 4);
+         regcache->cooked_read (NDS32_R0_REGNUM, valbuf);
+         regcache->cooked_read (NDS32_R0_REGNUM + 1, valbuf + 4);
        }
     }
 }
index f6088f38ef5eba29e808e35216d750dc344fd053..e1cbd9763301571e15b8ee12146803d315bb9601 100644 (file)
@@ -207,13 +207,13 @@ nios2_extract_return_value (struct gdbarch *gdbarch, struct type *valtype,
 
   /* Return values of up to 8 bytes are returned in $r2 $r3.  */
   if (len <= register_size (gdbarch, NIOS2_R2_REGNUM))
-    regcache_cooked_read (regcache, NIOS2_R2_REGNUM, valbuf);
+    regcache->cooked_read (NIOS2_R2_REGNUM, valbuf);
   else
     {
       gdb_assert (len <= (register_size (gdbarch, NIOS2_R2_REGNUM)
                          + register_size (gdbarch, NIOS2_R3_REGNUM)));
-      regcache_cooked_read (regcache, NIOS2_R2_REGNUM, valbuf);
-      regcache_cooked_read (regcache, NIOS2_R3_REGNUM, valbuf + 4);
+      regcache->cooked_read (NIOS2_R2_REGNUM, valbuf);
+      regcache->cooked_read (NIOS2_R3_REGNUM, valbuf + 4);
     }
 }
 
index 5716f8281051af57982740541ba8a299a62ed0c7..c114bee23c9d4f46ffcb9669ba0399b8823dbf47 100644 (file)
@@ -818,7 +818,7 @@ ppc_linux_get_syscall_number (struct gdbarch *gdbarch,
   /* Getting the system call number from the register.
      When dealing with PowerPC architecture, this information
      is stored at 0th register.  */
-  regcache_cooked_read (regcache, tdep->ppc_gp0_regnum, buf.data ());
+  regcache->cooked_read (tdep->ppc_gp0_regnum, buf.data ());
 
   return extract_signed_integer (buf.data (), tdep->wordsize, byte_order);
 }
index a6ba5d0ffd6d483eb71fa5614d32fa94ab766777..04f9447bad66b8624bd03ffdad4fd88f3f4f4624 100644 (file)
@@ -640,7 +640,7 @@ get_decimal_float_return_value (struct gdbarch *gdbarch, struct type *valtype,
        }
       if (readbuf != NULL)
        {
-         regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, readbuf);
+         regcache->cooked_read (tdep->ppc_fp0_regnum + 1, readbuf);
 
          /* Left align 32-bit decimal float.  */
          if (TYPE_LENGTH (valtype) == 4)
@@ -660,8 +660,8 @@ get_decimal_float_return_value (struct gdbarch *gdbarch, struct type *valtype,
                regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 2 + i,
                                       writebuf + i * 8);
              if (readbuf != NULL)
-               regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 2 + i,
-                                     readbuf + i * 8);
+               regcache->cooked_read (tdep->ppc_fp0_regnum + 2 + i,
+                                      readbuf + i * 8);
            }
        }
     }
@@ -710,7 +710,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
          gdb_byte regval[PPC_MAX_REGISTER_SIZE];
          struct type *regtype = register_type (gdbarch,
                                                 tdep->ppc_fp0_regnum + 1);
-         regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, regval);
+         regcache->cooked_read (tdep->ppc_fp0_regnum + 1, regval);
          target_float_convert (regval, regtype, readbuf, type);
        }
       if (writebuf)
@@ -733,9 +733,8 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
       /* IBM long double stored in f1 and f2.  */
       if (readbuf)
        {
-         regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, readbuf);
-         regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 2,
-                               readbuf + 8);
+         regcache->cooked_read (tdep->ppc_fp0_regnum + 1, readbuf);
+         regcache->cooked_read (tdep->ppc_fp0_regnum + 2, readbuf + 8);
        }
       if (writebuf)
        {
@@ -755,13 +754,10 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
         r5, r6.  */
       if (readbuf)
        {
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3, readbuf);
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
-                               readbuf + 4);
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 5,
-                               readbuf + 8);
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 6,
-                               readbuf + 12);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 3, readbuf);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 4, readbuf + 4);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 5, readbuf + 8);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 6, readbuf + 12);
        }
       if (writebuf)
        {
@@ -784,10 +780,8 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
        {
          /* A long long, double or _Decimal64 stored in the 32 bit
             r3/r4.  */
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3,
-                               readbuf + 0);
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
-                               readbuf + 4);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 3, readbuf + 0);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 4, readbuf + 4);
        }
       if (writebuf)
        {
@@ -859,7 +853,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
                }
              if (readbuf != NULL)
                {
-                 regcache_cooked_read (regcache, regnum, regval);
+                 regcache->cooked_read (regnum, regval);
                  target_float_convert (regval, regtype,
                                        readbuf + offset, eltype);
                }
@@ -903,7 +897,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
          if (writebuf != NULL)
            regcache_cooked_write (regcache, regnum, writebuf + offset);
          if (readbuf != NULL)
-           regcache_cooked_read (regcache, regnum, readbuf + offset);
+           regcache->cooked_read (regnum, readbuf + offset);
        }
 
       return RETURN_VALUE_REGISTER_CONVENTION;
@@ -916,7 +910,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
       if (readbuf)
        {
          /* Altivec places the return value in "v2".  */
-         regcache_cooked_read (regcache, tdep->ppc_vr0_regnum + 2, readbuf);
+         regcache->cooked_read (tdep->ppc_vr0_regnum + 2, readbuf);
        }
       if (writebuf)
        {
@@ -935,14 +929,10 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
         ABI risks in that case; we don't try to support it.  */
       if (readbuf)
        {
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3,
-                               readbuf + 0);
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
-                               readbuf + 4);
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 5,
-                               readbuf + 8);
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 6,
-                               readbuf + 12);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 3, readbuf + 0);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 4, readbuf + 4);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 5, readbuf + 8);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 6, readbuf + 12);
        }
       if (writebuf)
        {
@@ -968,7 +958,7 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
         only corresponds to the least significant 32-bits.  So place
         the 64-bit DSP type's value in ev3.  */
       if (readbuf)
-       regcache_cooked_read (regcache, tdep->ppc_ev0_regnum + 3, readbuf);
+       regcache->cooked_read (tdep->ppc_ev0_regnum + 3, readbuf);
       if (writebuf)
        regcache_cooked_write (regcache, tdep->ppc_ev0_regnum + 3, writebuf);
       return RETURN_VALUE_REGISTER_CONVENTION;
@@ -984,11 +974,11 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
 
       if (readbuf)
        {
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3,
-                               regvals + 0 * tdep->wordsize);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 3,
+                                regvals + 0 * tdep->wordsize);
          if (len > tdep->wordsize)
-           regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
-                                 regvals + 1 * tdep->wordsize);
+           regcache->cooked_read (tdep->ppc_gp0_regnum + 4,
+                                  regvals + 1 * tdep->wordsize);
          memcpy (readbuf, regvals + offset, len);
        }
       if (writebuf)
@@ -1012,11 +1002,11 @@ do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
          /* The value is right-padded to 8 bytes and then loaded, as
             two "words", into r3/r4.  */
          gdb_byte regvals[PPC_MAX_REGISTER_SIZE * 2];
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3,
-                               regvals + 0 * tdep->wordsize);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 3,
+                                regvals + 0 * tdep->wordsize);
          if (TYPE_LENGTH (type) > tdep->wordsize)
-           regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
-                                 regvals + 1 * tdep->wordsize);
+           regcache->cooked_read (tdep->ppc_gp0_regnum + 4,
+                                  regvals + 1 * tdep->wordsize);
          memcpy (readbuf, regvals, TYPE_LENGTH (type));
        }
       if (writebuf)
@@ -1824,7 +1814,7 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype,
        }
       if (readbuf != NULL)
        {
-         regcache_cooked_read (regcache, regnum, regval);
+         regcache->cooked_read (regnum, regval);
          target_float_convert (regval, regtype, readbuf, valtype);
        }
       return 1;
@@ -1865,8 +1855,8 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype,
        }
       if (readbuf != NULL)
        {
-         regcache_cooked_read (regcache, regnum, readbuf);
-         regcache_cooked_read (regcache, regnum + 1, readbuf + 8);
+         regcache->cooked_read (regnum, readbuf);
+         regcache->cooked_read (regnum + 1, readbuf + 8);
        }
       return 1;
     }
@@ -1887,8 +1877,8 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype,
        }
       if (readbuf != NULL)
        {
-         regcache_cooked_read (regcache, regnum, readbuf + hipart);
-         regcache_cooked_read (regcache, regnum + 1, readbuf + lopart);
+         regcache->cooked_read (regnum, readbuf + hipart);
+         regcache->cooked_read (regnum + 1, readbuf + lopart);
        }
       return 1;
     }
@@ -1903,7 +1893,7 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype,
       if (writebuf != NULL)
        regcache_cooked_write (regcache, regnum, writebuf);
       if (readbuf != NULL)
-       regcache_cooked_read (regcache, regnum, readbuf);
+       regcache->cooked_read (regnum, readbuf);
       return 1;
     }
 
@@ -2008,7 +1998,7 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function,
       if (writebuf != NULL)
        regcache_cooked_write (regcache, regnum, writebuf);
       if (readbuf != NULL)
-       regcache_cooked_read (regcache, regnum, readbuf);
+       regcache->cooked_read (regnum, readbuf);
       return RETURN_VALUE_REGISTER_CONVENTION;
     }
 
@@ -2092,7 +2082,7 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function,
            }
          if (readbuf != NULL)
            {
-             regcache_cooked_read (regcache, regnum, regval);
+             regcache->cooked_read (regnum, regval);
              if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG
                  && offset == 0)
                memcpy (readbuf, regval + tdep->wordsize - len, len);
index 9b670076e7e7e09fab214b8cbfb5a0bda8ffddd0..b8460d9c5d872fce1f7b1dcc936fe7406eb66b46 100644 (file)
@@ -833,7 +833,7 @@ record_full_exec_insn (struct regcache *regcache,
                               host_address_to_string (entry),
                               entry->u.reg.num);
 
-        regcache_cooked_read (regcache, entry->u.reg.num, reg.data ());
+        regcache->cooked_read (entry->u.reg.num, reg.data ());
         regcache_cooked_write (regcache, entry->u.reg.num, 
                               record_full_get_loc (entry));
         memcpy (record_full_get_loc (entry), reg.data (), entry->u.reg.len);
index 470042c7dac83ef6e478a93b4dc72e68de4d60a9..ec1bfb0876b48584f50e8c3666cb504ef3421a4c 100644 (file)
@@ -209,7 +209,7 @@ do_cooked_read (void *src, int regnum, gdb_byte *buf)
 {
   struct regcache *regcache = (struct regcache *) src;
 
-  return regcache_cooked_read (regcache, regnum, buf);
+  return regcache->cooked_read (regnum, buf);
 }
 
 readonly_detached_regcache::readonly_detached_regcache (const regcache &src)
@@ -600,12 +600,6 @@ regcache_raw_get_signed (struct regcache *regcache, int regnum)
   return value;
 }
 
-enum register_status
-regcache_cooked_read (struct regcache *regcache, int regnum, gdb_byte *buf)
-{
-  return regcache->cooked_read (regnum, buf);
-}
-
 enum register_status
 readable_regcache::cooked_read (int regnum, gdb_byte *buf)
 {
index e9cbcbea5b542801900e05ac55ac30d9c9b6e9ac..f7228e400325a39bcd8bac96529103179c677e15 100644 (file)
@@ -67,9 +67,6 @@ void regcache_invalidate (struct regcache *regcache, int regnum);
    constructed from valid, invalid or unavailable ``raw''
    registers.  */
 
-/* Transfer a cooked register [0..NUM_REGS+NUM_PSEUDO_REGS).  */
-enum register_status regcache_cooked_read (struct regcache *regcache,
-                                          int rawnum, gdb_byte *buf);
 void regcache_cooked_write (struct regcache *regcache, int rawnum,
                            const gdb_byte *buf);
 
@@ -252,6 +249,8 @@ public:
   /* Make certain that the register REGNUM is up-to-date.  */
   virtual void raw_update (int regnum) = 0;
 
+  /* Transfer a raw register [0..NUM_REGS+NUM_PSEUDO_REGS) from core-gdb to
+     this regcache, return its value in *BUF and return its availability status.  */
   enum register_status cooked_read (int regnum, gdb_byte *buf);
   template<typename T, typename = RequireLongest<T>>
   enum register_status cooked_read (int regnum, T *val);
index 9fa458b79b5832679e9b11f1b66b7efc7fbbcad4..6943121007a330400f4b06f3d0670ea8607bf1c2 100644 (file)
@@ -2248,7 +2248,7 @@ riscv_return_value (struct gdbarch  *gdbarch,
              regnum = info.argloc[0].loc_data.regno;
 
              if (readbuf)
-               regcache_cooked_read (regcache, regnum, readbuf);
+               regcache->cooked_read (regnum, readbuf);
 
              if (writebuf)
                regcache_cooked_write (regcache, regnum, writebuf);
@@ -2265,7 +2265,7 @@ riscv_return_value (struct gdbarch  *gdbarch,
                      if (readbuf)
                        {
                          readbuf += info.argloc[1].c_offset;
-                         regcache_cooked_read (regcache, regnum, readbuf);
+                         regcache->cooked_read (regnum, readbuf);
                        }
 
                      if (writebuf)
index ecf6191df017c361c4cca5795b46182d62fe6049..bb9e6be12ecb1cee916b137fe1520e2221dfe091 100644 (file)
@@ -420,7 +420,7 @@ rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
       && TYPE_LENGTH (valtype) == 16)
     {
       if (readbuf)
-       regcache_cooked_read (regcache, tdep->ppc_vr0_regnum + 2, readbuf);
+       regcache->cooked_read (tdep->ppc_vr0_regnum + 2, readbuf);
       if (writebuf)
        regcache_cooked_write (regcache, tdep->ppc_vr0_regnum + 2, writebuf);
 
@@ -452,7 +452,7 @@ rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
 
       if (readbuf)
        {
-         regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, regval);
+         regcache->cooked_read (tdep->ppc_fp0_regnum + 1, regval);
          target_float_convert (regval, regtype, readbuf, valtype);
        }
       if (writebuf)
@@ -504,9 +504,8 @@ rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
        {
          gdb_byte regval[8];
 
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3, regval);
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
-                               regval + 4);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 3, regval);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 4, regval + 4);
          memcpy (readbuf, regval, 8);
        }
       if (writebuf)
index a18d9c3641de59e4fad5cbf7d84a8e94dd0d3480..37ac61719a65c9f2c8be1e10f7ac255cb7fb091c 100644 (file)
@@ -281,7 +281,7 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
       && TYPE_LENGTH (valtype) == 16)
     {
       if (readbuf)
-       regcache_cooked_read (regcache, tdep->ppc_vr0_regnum + 2, readbuf);
+       regcache->cooked_read (tdep->ppc_vr0_regnum + 2, readbuf);
       if (writebuf)
        regcache_cooked_write (regcache, tdep->ppc_vr0_regnum + 2, writebuf);
 
@@ -313,7 +313,7 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
 
       if (readbuf)
        {
-         regcache_cooked_read (regcache, tdep->ppc_fp0_regnum + 1, regval);
+         regcache->cooked_read (tdep->ppc_fp0_regnum + 1, regval);
          target_float_convert (regval, regtype, readbuf, valtype);
        }
       if (writebuf)
@@ -365,9 +365,8 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
        {
          gdb_byte regval[8];
 
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3, regval);
-         regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
-                               regval + 4);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 3, regval);
+         regcache->cooked_read (tdep->ppc_gp0_regnum + 4, regval + 4);
          memcpy (readbuf, regval, 8);
        }
       if (writebuf)
index bbf696ed9d308f835d7eb78bbe01d608fb954f6f..8a82fb96da845e5982ee6eac723f6a2807a049e8 100644 (file)
@@ -2024,9 +2024,8 @@ s390_register_return_value (struct gdbarch *gdbarch, struct type *type,
        }
       else
        {
-         regcache_cooked_read (regcache, S390_R2_REGNUM, out);
-         regcache_cooked_read (regcache, S390_R3_REGNUM,
-                               out + word_size);
+         regcache->cooked_read (S390_R2_REGNUM, out);
+         regcache->cooked_read (S390_R3_REGNUM, out + word_size);
        }
     }
   else
@@ -2814,7 +2813,7 @@ s390_record_calc_disp_vsce (struct gdbarch *gdbarch, struct regcache *regcache,
   if (tdep->v0_full_regnum == -1 || el * es >= 16)
     return -1;
   if (vx < 16)
-    regcache_cooked_read (regcache, tdep->v0_full_regnum + vx, buf);
+    regcache->cooked_read (tdep->v0_full_regnum + vx, buf);
   else
     regcache->raw_read (S390_V16_REGNUM + vx - 16, buf);
   x = extract_unsigned_integer (buf + el * es, es, byte_order);
index f7fc8bbc6106ea30057ab70db603cdd56560d02f..00f4513489c751ed488500ab73ed8101fdd403f3 100644 (file)
@@ -286,7 +286,7 @@ sparc32_linux_get_syscall_number (struct gdbarch *gdbarch,
   /* Getting the system call number from the register.
      When dealing with the sparc architecture, this information
      is stored at the %g1 register.  */
-  regcache_cooked_read (regcache, SPARC_G1_REGNUM, buf);
+  regcache->cooked_read (SPARC_G1_REGNUM, buf);
 
   ret = extract_signed_integer (buf, 4, byte_order);
 
index c61fa5006f6adb465fb28dc01f911ec27d3c1a98..b3b3dcb4085c21fa4539a4a56988f6bc998e7144 100644 (file)
@@ -1409,20 +1409,20 @@ sparc32_extract_return_value (struct type *type, struct regcache *regcache,
       || TYPE_CODE (type) == TYPE_CODE_ARRAY)
     {
       /* Floating return values.  */
-      regcache_cooked_read (regcache, SPARC_F0_REGNUM, buf);
+      regcache->cooked_read (SPARC_F0_REGNUM, buf);
       if (len > 4)
-       regcache_cooked_read (regcache, SPARC_F1_REGNUM, buf + 4);
+       regcache->cooked_read (SPARC_F1_REGNUM, buf + 4);
       if (len > 8)
        {
-         regcache_cooked_read (regcache, SPARC_F2_REGNUM, buf + 8);
-         regcache_cooked_read (regcache, SPARC_F3_REGNUM, buf + 12);
+         regcache->cooked_read (SPARC_F2_REGNUM, buf + 8);
+         regcache->cooked_read (SPARC_F3_REGNUM, buf + 12);
        }
       if (len > 16)
        {
-         regcache_cooked_read (regcache, SPARC_F4_REGNUM, buf + 16);
-         regcache_cooked_read (regcache, SPARC_F5_REGNUM, buf + 20);
-         regcache_cooked_read (regcache, SPARC_F6_REGNUM, buf + 24);
-         regcache_cooked_read (regcache, SPARC_F7_REGNUM, buf + 28);
+         regcache->cooked_read (SPARC_F4_REGNUM, buf + 16);
+         regcache->cooked_read (SPARC_F5_REGNUM, buf + 20);
+         regcache->cooked_read (SPARC_F6_REGNUM, buf + 24);
+         regcache->cooked_read (SPARC_F7_REGNUM, buf + 28);
        }
       memcpy (valbuf, buf, len);
     }
@@ -1431,10 +1431,10 @@ sparc32_extract_return_value (struct type *type, struct regcache *regcache,
       /* Integral and pointer return values.  */
       gdb_assert (sparc_integral_or_pointer_p (type));
 
-      regcache_cooked_read (regcache, SPARC_O0_REGNUM, buf);
+      regcache->cooked_read (SPARC_O0_REGNUM, buf);
       if (len > 4)
        {
-         regcache_cooked_read (regcache, SPARC_O1_REGNUM, buf + 4);
+         regcache->cooked_read (SPARC_O1_REGNUM, buf + 4);
          gdb_assert (len == 8);
          memcpy (valbuf, buf, 8);
        }
index a48d54cd79baba083d853ab5a8b1a50e6f07172f..8810c80f60f5ff70deb96c33283bc2ea1c96a8af 100644 (file)
@@ -294,7 +294,7 @@ sparc64_linux_get_syscall_number (struct gdbarch *gdbarch,
   /* Getting the system call number from the register.
      When dealing with the sparc architecture, this information
      is stored at the %g1 register.  */
-  regcache_cooked_read (regcache, SPARC_G1_REGNUM, buf);
+  regcache->cooked_read (SPARC_G1_REGNUM, buf);
 
   ret = extract_signed_integer (buf, 8, byte_order);
 
index 7b1c1d5a23c1af6d53491fd7df65485a32b1b1e6..ed1aaffb2c855a8a0a092f804d479eab66a55e15 100644 (file)
@@ -1310,12 +1310,12 @@ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type,
       if (len < 4)
         {
           gdb_byte buf[4];
-          regcache_cooked_read (regcache, regnum, buf);
+          regcache->cooked_read (regnum, buf);
           memcpy (valbuf, buf + 4 - len, len);
         }
       else
         for (int i = 0; i < (len + 3) / 4; i++)
-          regcache_cooked_read (regcache, regnum + i, valbuf + i * 4);
+          regcache->cooked_read (regnum + i, valbuf + i * 4);
     }
   else if (sparc64_floating_p (type))
     {
@@ -1328,14 +1328,14 @@ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type,
 
          regnum = gdbarch_num_regs (gdbarch) + SPARC64_Q0_REGNUM
                    + bitpos / 128;
-         regcache_cooked_read (regcache, regnum, valbuf + (bitpos / 8));
+         regcache->cooked_read (regnum, valbuf + (bitpos / 8));
        }
       else if (len == 8)
        {
          gdb_assert (bitpos % 64 == 0 && bitpos >= 0 && bitpos < 256);
 
          regnum = gdbarch_num_regs (gdbarch) + SPARC64_D0_REGNUM + bitpos / 64;
-         regcache_cooked_read (regcache, regnum, valbuf + (bitpos / 8));
+         regcache->cooked_read (regnum, valbuf + (bitpos / 8));
        }
       else
        {
@@ -1343,7 +1343,7 @@ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type,
          gdb_assert (bitpos % 32 == 0 && bitpos >= 0 && bitpos < 256);
 
          regnum = SPARC_F0_REGNUM + bitpos / 32;
-         regcache_cooked_read (regcache, regnum, valbuf + (bitpos / 8));
+         regcache->cooked_read (regnum, valbuf + (bitpos / 8));
        }
     }
   else if (sparc64_structure_or_union_p (type))
@@ -1660,7 +1660,7 @@ sparc64_extract_return_value (struct type *type, struct regcache *regcache,
       gdb_assert (len <= 32);
 
       for (i = 0; i < ((len + 7) / 8); i++)
-       regcache_cooked_read (regcache, SPARC_O0_REGNUM + i, buf + i * 8);
+       regcache->cooked_read (SPARC_O0_REGNUM + i, buf + i * 8);
       if (TYPE_CODE (type) != TYPE_CODE_UNION)
        sparc64_extract_floating_fields (regcache, type, buf, 0);
       memcpy (valbuf, buf, len);
@@ -1669,7 +1669,7 @@ sparc64_extract_return_value (struct type *type, struct regcache *regcache,
     {
       /* Floating return values.  */
       for (i = 0; i < len / 4; i++)
-       regcache_cooked_read (regcache, SPARC_F0_REGNUM + i, buf + i * 4);
+       regcache->cooked_read (SPARC_F0_REGNUM + i, buf + i * 4);
       memcpy (valbuf, buf, len);
     }
   else if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
@@ -1678,7 +1678,7 @@ sparc64_extract_return_value (struct type *type, struct regcache *regcache,
       gdb_assert (len <= 32);
 
       for (i = 0; i < ((len + 7) / 8); i++)
-       regcache_cooked_read (regcache, SPARC_O0_REGNUM + i, buf + i * 8);
+       regcache->cooked_read (SPARC_O0_REGNUM + i, buf + i * 8);
       memcpy (valbuf, buf, len);
     }
   else
@@ -1688,7 +1688,7 @@ sparc64_extract_return_value (struct type *type, struct regcache *regcache,
 
       /* Just stripping off any unused bytes should preserve the
          signed-ness just fine.  */
-      regcache_cooked_read (regcache, SPARC_O0_REGNUM, buf);
+      regcache->cooked_read (SPARC_O0_REGNUM, buf);
       memcpy (valbuf, buf + 8 - len, len);
     }
 }
index 55d262fb1c2d8b3c8b98f75e6c3766cbd19d26e8..46287762bf3f77b4191e39007c9116523e669d86 100644 (file)
@@ -1387,7 +1387,7 @@ spu_regcache_to_value (struct regcache *regcache, int regnum,
     {
       while (len >= 16)
        {
-         regcache_cooked_read (regcache, regnum++, out);
+         regcache->cooked_read (regnum++, out);
          out += 16;
          len -= 16;
        }
@@ -1480,7 +1480,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
   sp -= 32;
 
   /* Store stack back chain.  */
-  regcache_cooked_read (regcache, SPU_RAW_SP_REGNUM, buf);
+  regcache->cooked_read (SPU_RAW_SP_REGNUM, buf);
   target_write_memory (sp, buf, 16);
 
   /* Finally, update all slots of the SP register.  */
index f11763d992581759acf9ab34de128ddf66a32b92..b2db026b32d9b0f803d631aa894537dd6498c403 100644 (file)
@@ -725,7 +725,7 @@ tic6x_extract_return_value (struct type *valtype, struct regcache *regcache,
        regcache_cooked_read_part (regcache, TIC6X_A4_REGNUM, 4 - len, len,
                                   valbuf);
       else
-       regcache_cooked_read (regcache, TIC6X_A4_REGNUM, valbuf);
+       regcache->cooked_read (TIC6X_A4_REGNUM, valbuf);
     }
   else if (len <= 8)
     {
@@ -736,13 +736,13 @@ tic6x_extract_return_value (struct type *valtype, struct regcache *regcache,
         lower (even) register.  */
       if (byte_order == BFD_ENDIAN_BIG)
        {
-         regcache_cooked_read (regcache, TIC6X_A4_REGNUM, valbuf + 4);
-         regcache_cooked_read (regcache, TIC6X_A5_REGNUM, valbuf);
+         regcache->cooked_read (TIC6X_A4_REGNUM, valbuf + 4);
+         regcache->cooked_read (TIC6X_A5_REGNUM, valbuf);
        }
       else
        {
-         regcache_cooked_read (regcache, TIC6X_A4_REGNUM, valbuf);
-         regcache_cooked_read (regcache, TIC6X_A5_REGNUM, valbuf + 4);
+         regcache->cooked_read (TIC6X_A4_REGNUM, valbuf);
+         regcache->cooked_read (TIC6X_A5_REGNUM, valbuf + 4);
        }
     }
 }
index 4c1ab2e73e64df39ed930327145fb0a344a715f8..a1783ec00110515dd4521b263af23e875e111b91 100644 (file)
@@ -227,9 +227,9 @@ vax_return_value (struct gdbarch *gdbarch, struct value *function,
   if (readbuf)
     {
       /* Read the contents of R0 and (if necessary) R1.  */
-      regcache_cooked_read (regcache, VAX_R0_REGNUM, buf);
+      regcache->cooked_read (VAX_R0_REGNUM, buf);
       if (len > 4)
-       regcache_cooked_read (regcache, VAX_R1_REGNUM, buf + 4);
+       regcache->cooked_read (VAX_R1_REGNUM, buf + 4);
       memcpy (readbuf, buf, len);
     }
   if (writebuf)