/* Target-machine dependent code for Renesas H8/300, for GDB.
- Copyright (C) 1988-2015 Free Software Foundation, Inc.
+ Copyright (C) 1988-2016 Free Software Foundation, Inc.
This file is part of GDB.
CORE_ADDR current_pc;
if (*this_cache)
- return *this_cache;
+ return (struct h8300_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct h8300_frame_cache);
h8300_init_frame_cache (gdbarch, cache);
/* Pad the argument appropriately. */
int padded_len = align_up (len, wordsize);
- gdb_byte *padded = xmalloc (padded_len);
+ gdb_byte *padded = (gdb_byte *) xmalloc (padded_len);
back_to = make_cleanup (xfree, padded);
memset (padded, 0, padded_len);
static void
h8300_extract_return_value (struct type *type, struct regcache *regcache,
- void *valbuf)
+ gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
store_unsigned_integer (valbuf, 2, byte_order, c);
regcache_cooked_read_unsigned (regcache, E_RET1_REGNUM, &c);
- store_unsigned_integer ((void *)((char *) valbuf + 2), 2, byte_order, c);
+ store_unsigned_integer (valbuf + 2, 2, byte_order, c);
break;
case 8: /* long long is now 8 bytes. */
if (TYPE_CODE (type) == TYPE_CODE_INT)
static void
h8300h_extract_return_value (struct type *type, struct regcache *regcache,
- void *valbuf)
+ gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
store_unsigned_integer (valbuf, 4, byte_order, c);
regcache_cooked_read_unsigned (regcache, E_RET1_REGNUM, &c);
- store_unsigned_integer ((void *) ((char *) valbuf + 4), 4,
- byte_order, c);
+ store_unsigned_integer (valbuf + 4, 4, byte_order, c);
}
else
{
static void
h8300_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);
static void
h8300h_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);