/* Target-dependent code for the Sanyo Xstormy16a (LC590000) processor.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 2001-2005, 2007-2012 Free Software Foundation, Inc.
This file is part of GDB.
}
static enum return_value_convention
-xstormy16_return_value (struct gdbarch *gdbarch, struct type *func_type,
+xstormy16_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
/* Put argument into registers wordwise. */
val = value_contents (args[i]);
for (j = 0; j < typelen; j += xstormy16_reg_size)
- regcache_cooked_write_unsigned (regcache, argreg++,
- extract_unsigned_integer (val + j,
- typelen - j ==
- 1 ? 1 :
- xstormy16_reg_size,
- byte_order));
+ {
+ ULONGEST regval;
+ int size = (typelen - j == 1) ? 1 : xstormy16_reg_size;
+
+ regval = extract_unsigned_integer (val + j, size, byte_order);
+ regcache_cooked_write_unsigned (regcache, argreg++, regval);
+ }
}
/* Align SP */
xstormy16_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr = 0, func_end = 0;
- char *func_name;
+ const char *func_name;
if (find_pc_partial_function (pc, &func_name, &func_addr, &func_end))
{
static const struct frame_unwind xstormy16_frame_unwind = {
NORMAL_FRAME,
+ default_frame_unwind_stop_reason,
xstormy16_frame_this_id,
xstormy16_frame_prev_register,
NULL,