dsp5680xx: fix warnings
[openocd.git] / src / target / breakpoints.c
index e722f67ef799e28baa00c170c142d3cca9729597..c0905ede6ab5caad3dc2254465b9bedfecfc3bc6 100644 (file)
@@ -228,6 +228,9 @@ int breakpoint_add(struct target *target, uint32_t address, uint32_t length, enu
                struct target_list *head;
                struct target *curr;
                head = target->head;
+               if (type == BKPT_SOFT)
+                       return(breakpoint_add_internal(head->target, address,length, type));
+
                while(head != (struct target_list*)NULL)
                {
                        curr = head->target;
@@ -312,7 +315,7 @@ static void breakpoint_free(struct target *target, struct breakpoint *breakpoint
        free(breakpoint);
 }
 
-void breakpoint_remove_internal(struct target *target, uint32_t address)
+int breakpoint_remove_internal(struct target *target, uint32_t address)
 {
        struct breakpoint *breakpoint = target->breakpoints;
 
@@ -330,14 +333,18 @@ void breakpoint_remove_internal(struct target *target, uint32_t address)
        if (breakpoint)
        {
                breakpoint_free(target, breakpoint);
+               return 1;
        }
        else
        {
-               LOG_ERROR("no breakpoint at address 0x%8.8" PRIx32 " found", address);
+               if (!target->smp)
+                       LOG_ERROR("no breakpoint at address 0x%8.8" PRIx32 " found", address);
+               return 0;
        }
 }
 void breakpoint_remove(struct target *target, uint32_t address)
 {
+       int found = 0;
        if (target->smp)
        {
                struct target_list *head;
@@ -346,9 +353,11 @@ void breakpoint_remove(struct target *target, uint32_t address)
                while(head != (struct target_list*)NULL)
                {
                        curr = head->target;
-                       breakpoint_remove_internal(curr, address);
+                       found += breakpoint_remove_internal(curr, address);
                        head = head->next;
                }
+               if (found == 0)
+                       LOG_ERROR("no breakpoint at address 0x%8.8" PRIx32 " found", address);
        }
        else  breakpoint_remove_internal(target, 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)