]> git.sur5r.net Git - openocd/blobdiff - src/target/breakpoints.c
TARGET: removed unsed parameter
[openocd] / src / target / breakpoints.c
index df797e3774017531cc83937fce25f87646f1971d..637f681d7f4f284d68337ada46c93c03b2f906b5 100644 (file)
@@ -22,7 +22,7 @@
 #endif
 
 #include "target.h"
-#include "log.h"
+#include <helper/log.h>
 #include "breakpoints.h"
 
 
@@ -109,6 +109,7 @@ static void breakpoint_free(struct target *target, struct breakpoint *breakpoint
 {
        struct breakpoint *breakpoint = target->breakpoints;
        struct breakpoint **breakpoint_p = &target->breakpoints;
+       int retval;
 
        while (breakpoint)
        {
@@ -121,9 +122,9 @@ static void breakpoint_free(struct target *target, struct breakpoint *breakpoint
        if (breakpoint == NULL)
                return;
 
-       target_remove_breakpoint(target, breakpoint);
+       retval = target_remove_breakpoint(target, breakpoint);
 
-       LOG_DEBUG("BPID: %d", breakpoint->unique_id );
+       LOG_DEBUG("free BPID: %d --> %d", breakpoint->unique_id, retval);
        (*breakpoint_p) = breakpoint->next;
        free(breakpoint->orig_instr);
        free(breakpoint);
@@ -157,7 +158,7 @@ void breakpoint_clear_target(struct target *target)
        struct breakpoint *breakpoint;
 
        LOG_DEBUG("Delete all breakpoints for target: %s",
-                       target_type_name(target));
+                       target_name(target));
        while ((breakpoint = target->breakpoints) != NULL)
        {
                breakpoint_free(target, breakpoint);
@@ -249,6 +250,7 @@ static void watchpoint_free(struct target *target, struct watchpoint *watchpoint
 {
        struct watchpoint *watchpoint = target->watchpoints;
        struct watchpoint **watchpoint_p = &target->watchpoints;
+       int retval;
 
        while (watchpoint)
        {
@@ -260,8 +262,8 @@ static void watchpoint_free(struct target *target, struct watchpoint *watchpoint
 
        if (watchpoint == NULL)
                return;
-       target_remove_watchpoint(target, watchpoint);
-       LOG_DEBUG("WPID: %d", watchpoint->unique_id );
+       retval = target_remove_watchpoint(target, watchpoint);
+       LOG_DEBUG("free WPID: %d --> %d", watchpoint->unique_id, retval);
        (*watchpoint_p) = watchpoint->next;
        free(watchpoint);
 }
@@ -294,7 +296,7 @@ void watchpoint_clear_target(struct target *target)
        struct watchpoint *watchpoint;
 
        LOG_DEBUG("Delete all watchpoints for target: %s",
-                       target_type_name(target));
+                       target_name(target));
        while ((watchpoint = target->watchpoints) != NULL)
        {
                watchpoint_free(target, watchpoint);