/* Target-dependent code for Analog Devices Blackfin processor, for GDB.
- Copyright (C) 2005-2014 Free Software Foundation, Inc.
+ Copyright (C) 2005-2015 Free Software Foundation, Inc.
Contributed by Analog Devices, Inc.
int i;
if (*this_cache)
- return *this_cache;
+ return (struct bfin_frame_cache *) *this_cache;
cache = bfin_alloc_frame_cache ();
*this_cache = cache;
static int
bfin_reg_to_regnum (struct gdbarch *gdbarch, int reg)
{
- if (reg > ARRAY_SIZE (map_gcc_gdb))
- return 0;
+ if (reg < 0 || reg >= ARRAY_SIZE (map_gcc_gdb))
+ return -1;
return map_gcc_gdb[reg];
}