/* Target-dependent code for the IQ2000 architecture, for GDB, the GNU
Debugger.
- Copyright (C) 2000, 2004, 2005, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 Free Software Foundation, Inc.
Contributed by Red Hat.
#include "gdbtypes.h"
#include "value.h"
#include "dis-asm.h"
-#include "gdb_string.h"
#include "arch-utils.h"
#include "regcache.h"
#include "osabi.h"
struct symtab_and_line sal;
CORE_ADDR pc;
CORE_ADDR loop_end;
- int found_store_lr = 0;
- int found_decr_sp = 0;
int srcreg;
int tgtreg;
signed short offset;
if (tgtreg >= 0 && tgtreg < E_NUM_REGS)
cache->saved_regs[tgtreg] = -((signed short) (insn & 0xffff));
- if (tgtreg == E_LR_REGNUM)
- found_store_lr = 1;
continue;
}
{
/* addi %1, %1, -N == addi %sp, %sp, -N */
/* LEGACY -- from assembly-only port. */
- found_decr_sp = 1;
cache->framesize = -((signed short) (insn & 0xffff));
continue;
}
int i;
if (*this_cache)
- return *this_cache;
+ return (struct iq2000_frame_cache *) *this_cache;
cache = FRAME_OBSTACK_ZALLOC (struct iq2000_frame_cache);
iq2000_init_frame_cache (cache);
*this_cache = cache;
cache->base = get_frame_register_unsigned (this_frame, E_FP_REGNUM);
- //if (cache->base == 0)
- //return cache;
current_pc = get_frame_pc (this_frame);
find_pc_partial_function (current_pc, NULL, &cache->pc, NULL);
while (len > 0)
{
- char buf[4];
+ gdb_byte buf[4];
int size = len % 4 ?: 4;
memset (buf, 0, 4);
static void
iq2000_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, regno++, &tmp);
store_unsigned_integer (valbuf, size, byte_order, tmp);
len -= size;
- valbuf = ((char *) valbuf) + size;
+ valbuf += size;
}
}
else
}
static enum return_value_convention
-iq2000_return_value (struct gdbarch *gdbarch, struct type *func_type,
+iq2000_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{