diff options
author | Mark Kettenis <kettenis@gnu.org> | 2005-05-14 11:27:03 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2005-05-14 11:27:03 +0000 |
commit | 42835c2ba0de387d6fa747413d4f6198d06a0f03 (patch) | |
tree | 602139b63292ce7152e0f1661c0d9b77983d54a1 | |
parent | 58d6f3a5e60bda04d60f1c07db1a798981c0692e (diff) | |
download | gdb-42835c2ba0de387d6fa747413d4f6198d06a0f03.zip gdb-42835c2ba0de387d6fa747413d4f6198d06a0f03.tar.gz gdb-42835c2ba0de387d6fa747413d4f6198d06a0f03.tar.bz2 |
* 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.
-rw-r--r-- | gdb/ChangeLog | 14 | ||||
-rw-r--r-- | gdb/amd64-tdep.c | 6 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 22 | ||||
-rw-r--r-- | gdb/i387-tdep.c | 4 | ||||
-rw-r--r-- | gdb/i387-tdep.h | 4 |
5 files changed, 31 insertions, 19 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 80e12e5..1efbfeb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,17 @@ +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) diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index d967ae9..fec7fa9 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -406,7 +406,7 @@ amd64_classify (struct type *type, enum amd64_reg_class class[2]) 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); @@ -503,10 +503,10 @@ amd64_return_value (struct gdbarch *gdbarch, struct type *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; diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index f273248..ce2ad81 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1438,8 +1438,8 @@ i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type) 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); @@ -1603,7 +1603,7 @@ i386_mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum) 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)) { @@ -1620,7 +1620,7 @@ i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, 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)) { @@ -1703,10 +1703,9 @@ i386_convert_register_p (int regnum, struct type *type) 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)? */ @@ -1726,10 +1725,10 @@ i386_register_to_value (struct frame_info *frame, int regnum, 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; } } @@ -1738,10 +1737,9 @@ i386_register_to_value (struct frame_info *frame, int regnum, 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)) { @@ -1758,10 +1756,10 @@ i386_value_to_register (struct frame_info *frame, int 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; } } diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 0d3c988..e48afa7 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -292,7 +292,7 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, 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]; @@ -317,7 +317,7 @@ i387_register_to_value (struct frame_info *frame, int regnum, 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]; diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h index 38e6755..a499fcb 100644 --- a/gdb/i387-tdep.h +++ b/gdb/i387-tdep.h @@ -60,13 +60,13 @@ extern void i387_print_float_info (struct gdbarch *gdbarch, 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); /* Size of the memory area use by the 'fsave' and 'fxsave' |