diff options
Diffstat (limited to 'gdb/sh64-tdep.c')
-rw-r--r-- | gdb/sh64-tdep.c | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index 8a81fcb8d25..b640b1d2aad 100644 --- a/gdb/sh64-tdep.c +++ b/gdb/sh64-tdep.c @@ -1067,8 +1067,8 @@ sh64_push_dummy_call (struct gdbarch *gdbarch, int argnum; struct type *type; CORE_ADDR regval; - char *val; - char valbuf[8]; + const gdb_byte *val; + gdb_byte valbuf[8]; int len; int argreg_size; int fp_args[12]; @@ -1113,22 +1113,21 @@ sh64_push_dummy_call (struct gdbarch *gdbarch, /* value gets right-justified in the register or stack word. */ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) memcpy (valbuf + argreg_size - len, - (char *) value_contents (args[argnum]), len); + value_contents (args[argnum]), len); else - memcpy (valbuf, (char *) value_contents (args[argnum]), len); + memcpy (valbuf, value_contents (args[argnum]), len); val = valbuf; } else - val = (char *) value_contents (args[argnum]); + val = value_contents (args[argnum]); while (len > 0) { if (int_argreg > ARGLAST_REGNUM) { /* Must go on the stack. */ - write_memory (sp + stack_offset, (const bfd_byte *) val, - argreg_size); + write_memory (sp + stack_offset, val, argreg_size); stack_offset += 8;/*argreg_size;*/ } /* NOTE WELL!!!!! This is not an "else if" clause!!! @@ -1153,7 +1152,7 @@ sh64_push_dummy_call (struct gdbarch *gdbarch, } else { - val = (char *) value_contents (args[argnum]); + val = value_contents (args[argnum]); if (len == 4) { /* Where is it going to be stored? */ @@ -1287,7 +1286,7 @@ sh64_extract_return_value (struct type *type, struct regcache *regcache, static void sh64_store_return_value (struct type *type, struct regcache *regcache, - const void *valbuf) + const gdb_byte *valbuf) { struct gdbarch *gdbarch = get_regcache_arch (regcache); gdb_byte buf[64]; /* more than enough... */ @@ -1299,9 +1298,9 @@ sh64_store_return_value (struct type *type, struct regcache *regcache, for (i = 0; i < len; i += 4) if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) regcache_raw_write (regcache, regnum++, - (char *) valbuf + len - 4 - i); + valbuf + len - 4 - i); else - regcache_raw_write (regcache, regnum++, (char *) valbuf + i); + regcache_raw_write (regcache, regnum++, valbuf + i); } else { @@ -1449,7 +1448,7 @@ sh64_register_type (struct gdbarch *gdbarch, int reg_nr) static void sh64_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, - struct type *type, char *from, char *to) + struct type *type, gdb_byte *from, gdb_byte *to) { if (gdbarch_byte_order (gdbarch) != BFD_ENDIAN_LITTLE) { @@ -1530,7 +1529,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int base_regnum; int offset = 0; - char temp_buffer[MAX_REGISTER_SIZE]; + gdb_byte temp_buffer[MAX_REGISTER_SIZE]; enum register_status status; if (reg_nr >= DR0_REGNUM @@ -1706,7 +1705,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int base_regnum, portion; int offset; - char temp_buffer[MAX_REGISTER_SIZE]; + gdb_byte temp_buffer[MAX_REGISTER_SIZE]; if (reg_nr >= DR0_REGNUM && reg_nr <= DR_LAST_REGNUM) @@ -1721,7 +1720,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, for (portion = 0; portion < 2; portion++) regcache_raw_write (regcache, base_regnum + portion, (temp_buffer - + register_size (gdbarch, + + register_size (gdbarch, base_regnum) * portion)); } @@ -1733,9 +1732,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, /* Write the real regs for which this one is an alias. */ for (portion = 0; portion < 2; portion++) regcache_raw_write (regcache, base_regnum + portion, - ((char *) buffer - + register_size (gdbarch, - base_regnum) * portion)); + (buffer + register_size (gdbarch, + base_regnum) * portion)); } else if (reg_nr >= FV0_REGNUM @@ -1746,9 +1744,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, /* Write the real regs for which this one is an alias. */ for (portion = 0; portion < 4; portion++) regcache_raw_write (regcache, base_regnum + portion, - ((char *) buffer - + register_size (gdbarch, - base_regnum) * portion)); + (buffer + register_size (gdbarch, + base_regnum) * portion)); } /* sh compact general pseudo registers. 1-to-1 with a shmedia @@ -1807,7 +1804,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, for (portion = 0; portion < 4; portion++) { regcache_raw_write (regcache, base_regnum + portion, - ((char *) buffer + (buffer + register_size (gdbarch, base_regnum) * portion)); } |