diff options
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/breakpoints.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/target/breakpoints.c b/src/target/breakpoints.c index 5ce0346..4a613cc 100644 --- a/src/target/breakpoints.c +++ b/src/target/breakpoints.c @@ -367,8 +367,10 @@ int breakpoint_remove(struct target *target, target_addr_t address) } } - if (num_found_breakpoints == 0) + if (num_found_breakpoints == 0) { LOG_TARGET_ERROR(target, "no breakpoint at address " TARGET_ADDR_FMT " found", address); + return ERROR_BREAKPOINT_NOT_FOUND; + } return retval; } @@ -591,7 +593,7 @@ int watchpoint_remove(struct target *target, target_addr_t address) num_found_watchpoints++; if (status != ERROR_OK) { - LOG_TARGET_ERROR(curr, "failed to remove watchpoint at address" TARGET_ADDR_FMT, address); + LOG_TARGET_ERROR(curr, "failed to remove watchpoint at address " TARGET_ADDR_FMT, address); retval = status; } } @@ -603,12 +605,14 @@ int watchpoint_remove(struct target *target, target_addr_t address) num_found_watchpoints++; if (retval != ERROR_OK) - LOG_TARGET_ERROR(target, "failed to remove watchpoint at address" TARGET_ADDR_FMT, address); + LOG_TARGET_ERROR(target, "failed to remove watchpoint at address " TARGET_ADDR_FMT, address); } } - if (num_found_watchpoints == 0) + if (num_found_watchpoints == 0) { LOG_TARGET_ERROR(target, "no watchpoint at address " TARGET_ADDR_FMT " found", address); + return ERROR_WATCHPOINT_NOT_FOUND; + } return retval; } |