aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32r-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2015-10-09 10:08:23 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2015-10-09 10:08:23 -0400
commit7c543f7b07678f69f22772bd2780602be67731d7 (patch)
tree737d5db4305846052777ecc91644bd034eca5833 /gdb/m32r-tdep.c
parent7567e115d312c3f8b56de6d1e2e8a90212e9dba8 (diff)
downloadgdb-7c543f7b07678f69f22772bd2780602be67731d7.zip
gdb-7c543f7b07678f69f22772bd2780602be67731d7.tar.gz
gdb-7c543f7b07678f69f22772bd2780602be67731d7.tar.bz2
Change some void* to gdb_byte*
There are a bunch of places where a void* is implicitely casted into a gdb_byte*. The auto-insert-casts script added explicit casts at those places. However, in many cases, it makes more sense to just change the void* to a gdb_byte*. gdb/ChangeLog: * aarch64-tdep.c (stack_item_t): Change type of data to gdb_byte*. * arm-tdep.c (struct stack_item): Likewise. (push_stack_item): Add gdb_byte* cast. * avr-tdep.c (struct stack_item): Change type of data to gdb_byte*. (push_stack_item): Add gdb_byte* cast. * cli/cli-dump.c (dump_memory_to_file): Change type of buf to gdb_byte* and add cast. * cris-tdep.c (struct stack_item): Change type of data to gdb_byte*. (push_stack_item): Add gdb_byte* cast. * gcore.c (gcore_copy_callback): Change type of memhunk to gdb_byte* and add cast. * gdbtypes.h (print_scalar_formatted): Change type of first parameter to gdb_byte*. * h8300-tdep.c (h8300_extract_return_value): Change type of valbuf to gdb_byte* and remove unnecessary cast. (h8300h_extract_return_value): Likewise. (h8300_store_return_value): Change type of valbuf to gdb_byte*. (h8300h_store_return_value): Likewise. * iq2000-tdep.c (iq2000_extract_return_value): Change type of valbuf to gdb_byte* and remove unnecessary cast. * jit.c (jit_reader_try_read_symtab): Change type of gdb_mem to gdb_byte* and add cast. * m32r-tdep.c (m32r_store_return_value): Change type of valbuf to gdb_byte* and remove unnecessary cast. (m32r_extract_return_value): Change type of dst to gdb_byte* and remove valbuf. * mep-tdep.c (mep_pseudo_cr32_read): Change type of buf to gdb_byte*. (mep_pseudo_cr64_read): Likewise. (mep_pseudo_csr_write): Likewise. (mep_pseudo_cr32_write): Likewise. (mep_pseudo_cr64_write): Likewise. * mi/mi-main.c (mi_cmd_data_write_memory): Change type of buffer to gdb_byte* and add cast. * moxie-tdep.c (moxie_store_return_value): Change type of valbuf to gdb_byte* and remove unnecessary cast. (moxie_extract_return_value): Change type of dst to gdb_byte* and remove valbuf. * p-valprint.c (print_scalar_formatted): Change type of valaddr to gdb_byte*. * printcmd.c (void): Likewise. * python/py-inferior.c (infpy_read_memory): Change type of buffer to gdb_byte* and add cast. (infpy_write_memory): Likewise. (infpy_search_memory): Likewise. * regcache.c (regcache_raw_write_signed): Change type of buf to gdb_byte* and add cast. (regcache_raw_write_unsigned): Likewise. (regcache_cooked_write_signed): Likewise. (regcache_cooked_write_unsigned): Likewise. * sh64-tdep.c (h64_extract_return_value): Change type of valbuf to gdb_byte*.
Diffstat (limited to 'gdb/m32r-tdep.c')
-rw-r--r--gdb/m32r-tdep.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 9b89ad9..472e666 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -249,7 +249,7 @@ m32r_register_type (struct gdbarch *gdbarch, int reg_nr)
static void
m32r_store_return_value (struct type *type, struct regcache *regcache,
- const void *valbuf)
+ const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -261,7 +261,7 @@ m32r_store_return_value (struct type *type, struct regcache *regcache,
if (len > 4)
{
- regval = extract_unsigned_integer ((gdb_byte *) valbuf + 4,
+ regval = extract_unsigned_integer (valbuf + 4,
len - 4, byte_order);
regcache_cooked_write_unsigned (regcache, RET1_REGNUM + 1, regval);
}
@@ -776,25 +776,24 @@ m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
static void
m32r_extract_return_value (struct type *type, struct regcache *regcache,
- void *dst)
+ gdb_byte *dst)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- bfd_byte *valbuf = dst;
int len = TYPE_LENGTH (type);
ULONGEST tmp;
/* By using store_unsigned_integer we avoid having to do
anything special for small big-endian values. */
regcache_cooked_read_unsigned (regcache, RET1_REGNUM, &tmp);
- store_unsigned_integer (valbuf, (len > 4 ? len - 4 : len), byte_order, tmp);
+ store_unsigned_integer (dst, (len > 4 ? len - 4 : len), byte_order, tmp);
/* Ignore return values more than 8 bytes in size because the m32r
returns anything more than 8 bytes in the stack. */
if (len > 4)
{
regcache_cooked_read_unsigned (regcache, RET1_REGNUM + 1, &tmp);
- store_unsigned_integer (valbuf + len - 4, 4, byte_order, tmp);
+ store_unsigned_integer (dst + len - 4, 4, byte_order, tmp);
}
}