hla: fix watchpoints not being set 31/931/3
authorSpencer Oliver <spen@spen-soft.co.uk>
Thu, 25 Oct 2012 15:37:14 +0000 (16:37 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Sun, 23 Dec 2012 21:46:02 +0000 (21:46 +0000)
Watchpoints were not being enabled when the hl adapter target was resumed.
This effects both stlink and icdi interfaces.

Change-Id: Ia9f8a9415be97a467cd099b63b6bc9f7f37d0c0d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/931
Tested-by: jenkins
src/target/cortex_m.c
src/target/cortex_m.h
src/target/hla_target.c

index 4d9daf5ca09e48de924fda94476f4b207655107d..ca2211fb4387ed3691883671377d1b3f257796bd 100644 (file)
@@ -677,7 +677,7 @@ static int cortex_m3_soft_reset_halt(struct target *target)
        return ERROR_OK;
 }
 
-static void cortex_m3_enable_breakpoints(struct target *target)
+void cortex_m3_enable_breakpoints(struct target *target)
 {
        struct breakpoint *breakpoint = target->breakpoints;
 
index a9bd7a4971e9798c063acf539dbf35ea0c281c1a..11d70524bcc7f219cc068e6ca8944670fc36c2d6 100644 (file)
@@ -194,6 +194,7 @@ int cortex_m3_set_watchpoint(struct target *target, struct watchpoint *watchpoin
 int cortex_m3_unset_watchpoint(struct target *target, struct watchpoint *watchpoint);
 int cortex_m3_add_watchpoint(struct target *target, struct watchpoint *watchpoint);
 int cortex_m3_remove_watchpoint(struct target *target, struct watchpoint *watchpoint);
+void cortex_m3_enable_breakpoints(struct target *target);
 void cortex_m3_enable_watchpoints(struct target *target);
 void cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target *target);
 
index 272c25e0526302a29ee322f91363f01d347da384..3c3b84175704acc6ca84e9f3ff3f4da5b5e19ee1 100644 (file)
@@ -551,6 +551,12 @@ static int adapter_resume(struct target *target, int current,
                return ERROR_TARGET_NOT_HALTED;
        }
 
+       if (!debug_execution) {
+               target_free_all_working_areas(target);
+               cortex_m3_enable_breakpoints(target);
+               cortex_m3_enable_watchpoints(target);
+       }
+
        pc = armv7m->arm.pc;
        if (!current) {
                buf_set_u32(pc->value, 0, 32, address);

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)