/* Target dependent code for CRIS, for GDB, the GNU debugger.
- Copyright (C) 2001-2014 Free Software Foundation, Inc.
+ Copyright (C) 2001-2015 Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hendrik Ruijter, Stefan Andersson, and Orjan Friberg.
static struct stack_item *
push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len)
{
- struct stack_item *si;
- si = xmalloc (sizeof (struct stack_item));
+ struct stack_item *si = XNEW (struct stack_item);
si->data = xmalloc (len);
si->len = len;
si->prev = prev;
}
/* No matching architecture was found. Create a new one. */
- tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+ tdep = XNEW (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
tdep->cris_version = usr_cmd_cris_version;