X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Farm11.c;h=31135e4a752192ccd4a3a42f3ace47eb625863c5;hp=4d9016fdc28bed8b8e17933d9c36523c103a0403;hb=a2df544fd9cb758163b049f389c5cc07e97e029f;hpb=d7d857a1896005df53956565644b138a76a1f0ec diff --git a/src/target/arm11.c b/src/target/arm11.c index 4d9016fdc2..31135e4a75 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -27,7 +27,6 @@ #endif #include "etm.h" -#include "arm11.h" #include "breakpoints.h" #include "arm11_dbgtap.h" #include "arm_simulator.h" @@ -1665,13 +1664,13 @@ static int arm11_run_algorithm(struct target *target, if (!reg) { LOG_ERROR("BUG: register '%s' not found", reg_params[i].reg_name); - exit(-1); + return ERROR_INVALID_ARGUMENTS; } if (reg->size != reg_params[i].size) { LOG_ERROR("BUG: register '%s' size doesn't match reg_params[i].size", reg_params[i].reg_name); - exit(-1); + return ERROR_INVALID_ARGUMENTS; } arm11_set_reg(reg,reg_params[i].value); // printf("%i: Set %s =%08x\n", i, reg_params[i].reg_name,val); @@ -1750,13 +1749,15 @@ static int arm11_run_algorithm(struct target *target, if (!reg) { LOG_ERROR("BUG: register '%s' not found", reg_params[i].reg_name); - exit(-1); + retval = ERROR_INVALID_ARGUMENTS; + goto del_breakpoint; } if (reg->size != reg_params[i].size) { LOG_ERROR("BUG: register '%s' size doesn't match reg_params[i].size", reg_params[i].reg_name); - exit(-1); + retval = ERROR_INVALID_ARGUMENTS; + goto del_breakpoint; } buf_set_u32(reg_params[i].value, 0, 32, buf_get_u32(reg->value, 0, 32));