+2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+
+ * regcache.h (regcache_raw_write_part): Remove, update callers
+ to use regcache::raw_write_part instead.
+ * regcache.c (regcache_raw_write_part): Remove.
+
2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
* regcache.h (regcache_raw_read_part): Remove, update callers to
regcache->raw_read_part (regnum, offset, std::min (len, 8),
readbuf + i * 8);
if (writebuf)
- regcache_raw_write_part (regcache, regnum, offset, std::min (len, 8),
- writebuf + i * 8);
+ regcache->raw_write_part (regnum, offset, std::min (len, 8),
+ writebuf + i * 8);
}
return RETURN_VALUE_REGISTER_CONVENTION;
gdb_assert (regnum != -1);
memset (buf, 0, sizeof buf);
memcpy (buf, valbuf + j * 8, std::min (len, 8));
- regcache_raw_write_part (regcache, regnum, offset, 8, buf);
+ regcache->raw_write_part (regnum, offset, 8, buf);
}
}
}
if (readbuf)
regcache->raw_read_part (regnum, 0, len, readbuf);
if (writebuf)
- regcache_raw_write_part (regcache, regnum, 0, len, writebuf);
+ regcache->raw_write_part (regnum, 0, len, writebuf);
return RETURN_VALUE_REGISTER_CONVENTION;
}
}
int high_size = register_size (gdbarch, HIGH_RETURN_REGNUM);
if (len <= low_size)
- regcache_raw_write_part (regcache, LOW_RETURN_REGNUM, 0, len, valbuf);
+ regcache->raw_write_part (LOW_RETURN_REGNUM, 0, len, valbuf);
else if (len <= (low_size + high_size))
{
regcache->raw_write (LOW_RETURN_REGNUM, valbuf);
- regcache_raw_write_part (regcache, HIGH_RETURN_REGNUM, 0,
- len - low_size, valbuf + low_size);
+ regcache->raw_write_part (HIGH_RETURN_REGNUM, 0, len - low_size,
+ valbuf + low_size);
}
else
internal_error (__FILE__, __LINE__,
/* First argument is passed in D and X registers. */
if (len <= 2)
- regcache_raw_write_part (regcache, HARD_D_REGNUM, 2 - len, len, valbuf);
+ regcache->raw_write_part (HARD_D_REGNUM, 2 - len, len, valbuf);
else if (len <= 4)
{
- regcache_raw_write_part (regcache, HARD_X_REGNUM, 4 - len,
- len - 2, valbuf);
+ regcache->raw_write_part (HARD_X_REGNUM, 4 - len, len - 2, valbuf);
regcache->raw_write (HARD_D_REGNUM, valbuf + (len - 2));
}
else
int len = TYPE_LENGTH (type);
if (len <= 4)
- regcache_raw_write_part (regcache, M68K_D0_REGNUM, 4 - len, len, valbuf);
+ regcache->raw_write_part (M68K_D0_REGNUM, 4 - len, len, valbuf);
else if (len <= 8)
{
- regcache_raw_write_part (regcache, M68K_D0_REGNUM, 8 - len,
- len - 4, valbuf);
+ regcache->raw_write_part (M68K_D0_REGNUM, 8 - len, len - 4, valbuf);
regcache->raw_write (M68K_D1_REGNUM, valbuf + (len - 4));
}
else
register_size (gdbarch, cookednum))
{
if (gdbarch_tdep (gdbarch)->mips64_transfers_32bit_regs_p)
- regcache_raw_write_part (regcache, rawnum, 0, 4, buf);
+ regcache->raw_write_part (rawnum, 0, 4, buf);
else
{
/* Sign extend the shortened version of the register prior
regsz = register_size (gdbarch, reg);
if (len <= regsz)
- regcache_raw_write_part (regcache, reg, 0, len, valbuf);
+ regcache->raw_write_part (reg, 0, len, valbuf);
else if (len <= 2 * regsz)
{
regcache->raw_write (reg, valbuf);
gdb_assert (regsz == register_size (gdbarch, reg + 1));
- regcache_raw_write_part (regcache, reg+1, 0,
- len - regsz, valbuf + regsz);
+ regcache->raw_write_part (reg + 1, 0, len - regsz, valbuf + regsz);
}
else
internal_error (__FILE__, __LINE__,
return read_part (regnum, offset, len, buf, true);
}
-void
-regcache_raw_write_part (struct regcache *regcache, int regnum,
- int offset, int len, const gdb_byte *buf)
-{
- regcache->raw_write_part (regnum, offset, len, buf);
-}
+/* See regcache.h. */
void
regcache::raw_write_part (int regnum, int offset, int len,
extern LONGEST regcache_raw_get_signed (struct regcache *regcache,
int regnum);
-/* Partial transfer of raw registers. These perform read, modify,
- write style operations. The read variant returns the status of the
- register. */
-
-void regcache_raw_write_part (struct regcache *regcache, int regnum,
- int offset, int len, const gdb_byte *buf);
-
void regcache_invalidate (struct regcache *regcache, int regnum);
/* Transfer of pseudo-registers. The read variants return a register
void raw_collect_integer (int regnum, gdb_byte *addr, int addr_len,
bool is_signed) const;
+ /* Partial transfer of raw registers. Perform read, modify, write style
+ operations. */
void raw_write_part (int regnum, int offset, int len, const gdb_byte *buf);
void cooked_write_part (int regnum, int offset, int len,
int offset = gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG ? 0 : 8;
/* Write the portion that overlaps the VMX register. */
- regcache_raw_write_part (regcache, tdep->ppc_vr0_regnum + reg_index,
- offset, register_size (gdbarch, reg_nr),
- buffer);
+ regcache->raw_write_part (tdep->ppc_vr0_regnum + reg_index, offset,
+ register_size (gdbarch, reg_nr), buffer);
}
static enum register_status
for (; len > 0; len -= 4, areg++, valbuf += 4)
{
if (len < 4)
- regcache_raw_write_part (regcache, areg, offset, len, valbuf);
+ regcache->raw_write_part (areg, offset, len, valbuf);
else
regcache->raw_write (areg, valbuf);
}