]> git.sur5r.net Git - openocd/blobdiff - src/target/arm7_9_common.c
- trying to remove a breakpoint with target running should not exit(-1) from OpenOCD
[openocd] / src / target / arm7_9_common.c
index 77a43feebb265a845b4a8e423da7f5079e2908e4..cda99d842a05126ca9ec9cd8cedef4cb15e13b9c 100644 (file)
@@ -846,6 +846,13 @@ int arm7_9_prepare_reset_halt(target_t *target)
        armv4_5_common_t *armv4_5 = target->arch_info;
        arm7_9_common_t *arm7_9 = armv4_5->arch_info;
        
+       /* poll the target, and resume if it was currently halted */
+       arm7_9_poll(target);
+       if (target->state == TARGET_HALTED)
+       {
+               arm7_9_resume(target, 1, 0x0, 0, 1);
+       }
+       
        if (arm7_9->has_vector_catch)
        {
                /* program vector catch register to catch reset vector */