|
@@ -1273,6 +1273,16 @@ static long check_bp_loc(unsigned long addr)
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+/* Force enable xmon if not already enabled */
|
|
|
+static inline void force_enable_xmon(void)
|
|
|
+{
|
|
|
+ /* Enable xmon hooks if needed */
|
|
|
+ if (!xmon_on) {
|
|
|
+ printf("xmon: Enabling debugger hooks\n");
|
|
|
+ xmon_on = 1;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
static char *breakpoint_help_string =
|
|
|
"Breakpoint command usage:\n"
|
|
|
"b show breakpoints\n"
|
|
@@ -1315,6 +1325,8 @@ bpt_cmds(void)
|
|
|
dabr.address &= ~HW_BRK_TYPE_DABR;
|
|
|
dabr.enabled = mode | BP_DABR;
|
|
|
}
|
|
|
+
|
|
|
+ force_enable_xmon();
|
|
|
break;
|
|
|
|
|
|
case 'i': /* bi - hardware instr breakpoint */
|
|
@@ -1335,6 +1347,7 @@ bpt_cmds(void)
|
|
|
if (bp != NULL) {
|
|
|
bp->enabled |= BP_CIABR;
|
|
|
iabr = bp;
|
|
|
+ force_enable_xmon();
|
|
|
}
|
|
|
break;
|
|
|
#endif
|
|
@@ -1399,8 +1412,10 @@ bpt_cmds(void)
|
|
|
if (!check_bp_loc(a))
|
|
|
break;
|
|
|
bp = new_breakpoint(a);
|
|
|
- if (bp != NULL)
|
|
|
+ if (bp != NULL) {
|
|
|
bp->enabled |= BP_TRAP;
|
|
|
+ force_enable_xmon();
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
}
|