/* Target-dependent code for Analog Devices Blackfin processor, for GDB.
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2015 Free Software Foundation, Inc.
Contributed by Analog Devices, Inc.
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_string.h"
#include "inferior.h"
#include "gdbcore.h"
#include "arch-utils.h"
#include "frame-base.h"
#include "trad-frame.h"
#include "dis-asm.h"
-#include "gdb_assert.h"
#include "sim-regno.h"
#include "gdb/sim-bfin.h"
#include "dwarf2-frame.h"
int i;
if (*this_cache)
- return *this_cache;
+ return (struct bfin_frame_cache *) *this_cache;
cache = bfin_alloc_frame_cache ();
*this_cache = cache;
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- char buf[4];
+ gdb_byte buf[4];
int i;
long reg_r0, reg_r1, reg_r2;
int total_len = 0;
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];
}
return arches->gdbarch;
}
- tdep = XMALLOC (struct gdbarch_tdep);
+ tdep = XNEW (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
tdep->bfin_abi = abi;