/* Target dependent code for CRIS, for GDB, the GNU debugger.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hendrik Ruijter, Stefan Andersson, and Orjan Friberg.
static const char cris_mode_normal[] = "normal";
static const char cris_mode_guru[] = "guru";
-static const char *cris_modes[] = {
+static const char *const cris_modes[] = {
cris_mode_normal,
cris_mode_guru,
0
static const struct frame_unwind cris_sigtramp_frame_unwind =
{
SIGTRAMP_FRAME,
+ default_frame_unwind_stop_reason,
cris_sigtramp_frame_this_id,
cris_sigtramp_frame_prev_register,
NULL,
return ret;
}
-/* Hardware watchpoint support. */
-
-/* We support 6 hardware data watchpoints, but cannot trigger on execute
- (any combination of read/write is fine). */
-
-int
-cris_can_use_hardware_watchpoint (int type, int count, int other)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (target_gdbarch);
-
- /* No bookkeeping is done here; it is handled by the remote debug agent. */
-
- if (tdep->cris_version != 32)
- return 0;
- else
- /* CRISv32: Six data watchpoints, one for instructions. */
- return (((type == bp_read_watchpoint || type == bp_access_watchpoint
- || type == bp_hardware_watchpoint) && count <= 6)
- || (type == bp_hardware_breakpoint && count <= 1));
-}
-
-/* The CRISv32 hardware data watchpoints work by specifying ranges,
- which have no alignment or length restrictions. */
-
-int
-cris_region_ok_for_watchpoint (CORE_ADDR addr, int len)
-{
- return 1;
-}
-
-/* If the inferior has some watchpoint that triggered, return the
- address associated with that watchpoint. Otherwise, return
- zero. */
-
-CORE_ADDR
-cris_stopped_data_address (void)
-{
- CORE_ADDR eda;
- eda = get_frame_register_unsigned (get_current_frame (), EDA_REGNUM);
- return eda;
-}
-
/* The instruction environment needed to find single-step breakpoints. */
typedef
static const struct frame_unwind cris_frame_unwind =
{
NORMAL_FRAME,
+ default_frame_unwind_stop_reason,
cris_frame_this_id,
cris_frame_prev_register,
NULL,
return;
}
/* The shift size is given as a 5 bit quick value, i.e. we don't
- want the the sign bit of the quick value. */
+ want the sign bit of the quick value. */
shift_steps = cris_get_asr_shift_steps (inst);
value = inst_env->reg[REG_PC];
if (value & SIGNED_DWORD_MASK)
{
check_assign (inst, inst_env);
- /* Get the new value for the the PC. */
+ /* Get the new value for the PC. */
newpc =
read_memory_unsigned_integer ((CORE_ADDR) inst_env->prefix_value,
4, inst_env->byte_order);