TCF Agent: fixed stepping over a triggered watchpoint on ARMv7
diff --git a/agent/machine/arm/tcf/cpudefs-mdep.c b/agent/machine/arm/tcf/cpudefs-mdep.c
index 68d8561..24dd5f0 100644
--- a/agent/machine/arm/tcf/cpudefs-mdep.c
+++ b/agent/machine/arm/tcf/cpudefs-mdep.c
@@ -189,6 +189,17 @@
     return 0;
 }
 
+static int is_triggered(Context * ctx, ContextBreakpoint * cb) {
+    if (ctx->stopped_by_cb != NULL) {
+        unsigned i = 0;
+        while (ctx->stopped_by_cb[i] != NULL) {
+            if (ctx->stopped_by_cb[i] == cb) return 1;
+            i++;
+        }
+    }
+    return 0;
+}
+
 static int set_debug_regs(Context * ctx, int * step_over_hw_bp) {
     int i, j;
     ContextAddress pc = 0;
@@ -224,6 +235,10 @@
                 /* Skipping the breakpoint */
                 *step_over_hw_bp = 1;
             }
+            else if (bps->arch > 2 && i >= bps->bp_cnt && is_triggered(ctx, cb)) {
+                /* Skipping the watchpoint */
+                *step_over_hw_bp = 1;
+            }
             else {
                 uint32_t vr = (uint32_t)(cb->address & ~3);
                 if (i < bps->bp_cnt) {