diff options
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/cortex_a8.c | 5 | ||||
-rw-r--r-- | src/target/cortex_m3.c | 3 | ||||
-rw-r--r-- | src/target/mips_m4k.c | 6 |
3 files changed, 5 insertions, 9 deletions
diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index 9b3521ac..8b4ced59 100644 --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -1230,7 +1230,7 @@ static int cortex_a8_set_breakpoint(struct target *target, if (brp_i >= cortex_a8->brp_num) { LOG_ERROR("ERROR Can not find free Breakpoint Register Pair"); - return ERROR_FAIL; + return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } breakpoint->set = brp_i + 1; if (breakpoint->length == 2) @@ -1360,9 +1360,8 @@ static int cortex_a8_add_breakpoint(struct target *target, if (breakpoint->type == BKPT_HARD) cortex_a8->brp_num_available--; - cortex_a8_set_breakpoint(target, breakpoint, 0x00); /* Exact match */ - return ERROR_OK; + return cortex_a8_set_breakpoint(target, breakpoint, 0x00); /* Exact match */ } static int cortex_a8_remove_breakpoint(struct target *target, struct breakpoint *breakpoint) diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index f87c3e0b..3011b597 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -1221,9 +1221,8 @@ cortex_m3_add_breakpoint(struct target *target, struct breakpoint *breakpoint) if (breakpoint->type == BKPT_HARD) cortex_m3->fp_code_available--; - cortex_m3_set_breakpoint(target, breakpoint); - return ERROR_OK; + return cortex_m3_set_breakpoint(target, breakpoint); } static int diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c index 21ff0ba9..62c484a9 100644 --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -497,7 +497,7 @@ static int mips_m4k_set_breakpoint(struct target *target, { LOG_ERROR("Can not find free FP Comparator(bpid: %d)", breakpoint->unique_id ); - return ERROR_FAIL; + return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } breakpoint->set = bp_num + 1; comparator_list[bp_num].used = 1; @@ -662,9 +662,7 @@ static int mips_m4k_add_breakpoint(struct target *target, struct breakpoint *bre mips32->num_inst_bpoints_avail--; } - mips_m4k_set_breakpoint(target, breakpoint); - - return ERROR_OK; + return mips_m4k_set_breakpoint(target, breakpoint); } static int mips_m4k_remove_breakpoint(struct target *target, |