writebuf arguments to `gdb_byte *'. Remove now redundant casts.
* i386-tdep.c (i386_return_value): Change type of readbuf and
writebuf arguments to `gdb_byte *'.
(i386_pseudo_register_read, i386_pseudo_register_write): Change
type of last argument to `gdb_byte *'.
(i386_register_to_value, i386_value_to_register): Change type of
last argument to `gdb_byte *'. Simplify function a bit.
* i387-tdep.h (i387_value_to_register, i387_register_to_value):
Change type of last argument to `gdb_byte *'.
* i387-tdep.c: Likewise.
+2005-05-14 Mark Kettenis <kettenis@gnu.org>
+
+ * amd64-tdep.c (amd64_return_value): Change type of readbuf and
+ writebuf arguments to `gdb_byte *'. Remove now redundant casts.
+ * i386-tdep.c (i386_return_value): Change type of readbuf and
+ writebuf arguments to `gdb_byte *'.
+ (i386_pseudo_register_read, i386_pseudo_register_write): Change
+ type of last argument to `gdb_byte *'.
+ (i386_register_to_value, i386_value_to_register): Change type of
+ last argument to `gdb_byte *'. Simplify function a bit.
+ * i387-tdep.h (i387_value_to_register, i387_register_to_value):
+ Change type of last argument to `gdb_byte *'.
+ * i387-tdep.c: Likewise.
+
2005-05-13 Andrew Cagney <cagney@gnu.org>
* gdbarch.sh (pseudo_register_read, pseudo_register_write)
static enum return_value_convention
amd64_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache,
- void *readbuf, const void *writebuf)
+ gdb_byte *readbuf, const gdb_byte *writebuf)
{
enum amd64_reg_class class[2];
int len = TYPE_LENGTH (type);
if (readbuf)
regcache_raw_read_part (regcache, regnum, offset, min (len, 8),
- ((gdb_byte *)readbuf) + i * 8);
+ readbuf + i * 8);
if (writebuf)
regcache_raw_write_part (regcache, regnum, offset, min (len, 8),
- ((const gdb_byte *)writebuf) + i * 8);
+ writebuf + i * 8);
}
return RETURN_VALUE_REGISTER_CONVENTION;
static enum return_value_convention
i386_return_value (struct gdbarch *gdbarch, struct type *type,
- struct regcache *regcache, void *readbuf,
- const void *writebuf)
+ struct regcache *regcache, gdb_byte *readbuf,
+ const gdb_byte *writebuf)
{
enum type_code code = TYPE_CODE (type);
static void
i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
- int regnum, void *buf)
+ int regnum, gdb_byte *buf)
{
if (i386_mmx_regnum_p (gdbarch, regnum))
{
static void
i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
- int regnum, const void *buf)
+ int regnum, const gdb_byte *buf)
{
if (i386_mmx_regnum_p (gdbarch, regnum))
{
static void
i386_register_to_value (struct frame_info *frame, int regnum,
- struct type *type, void *to)
+ struct type *type, gdb_byte *to)
{
int len = TYPE_LENGTH (type);
- gdb_byte *buf = to;
/* FIXME: kettenis/20030609: What should we do if REGNUM isn't
available in FRAME (i.e. if it wasn't saved)? */
gdb_assert (regnum != -1);
gdb_assert (register_size (current_gdbarch, regnum) == 4);
- get_frame_register (frame, regnum, buf);
+ get_frame_register (frame, regnum, to);
regnum = i386_next_regnum (regnum);
len -= 4;
- buf += 4;
+ to += 4;
}
}
static void
i386_value_to_register (struct frame_info *frame, int regnum,
- struct type *type, const void *from)
+ struct type *type, const gdb_byte *from)
{
int len = TYPE_LENGTH (type);
- const gdb_byte *buf = from;
if (i386_fp_regnum_p (regnum))
{
gdb_assert (regnum != -1);
gdb_assert (register_size (current_gdbarch, regnum) == 4);
- put_frame_register (frame, regnum, buf);
+ put_frame_register (frame, regnum, from);
regnum = i386_next_regnum (regnum);
len -= 4;
- buf += 4;
+ from += 4;
}
}
\f
void
i387_register_to_value (struct frame_info *frame, int regnum,
- struct type *type, void *to)
+ struct type *type, gdb_byte *to)
{
char from[I386_MAX_REGISTER_SIZE];
void
i387_value_to_register (struct frame_info *frame, int regnum,
- struct type *type, const void *from)
+ struct type *type, const gdb_byte *from)
{
char to[I386_MAX_REGISTER_SIZE];
return its contents in TO. */
extern void i387_register_to_value (struct frame_info *frame, int regnum,
- struct type *type, void *to);
+ struct type *type, gdb_byte *to);
/* Write the contents FROM of a value of type TYPE into register
REGNUM in frame FRAME. */
extern void i387_value_to_register (struct frame_info *frame, int regnum,
- struct type *type, const void *from);
+ struct type *type, const gdb_byte *from);
\f
/* Size of the memory area use by the 'fsave' and 'fxsave'