Clear abstract errors from register_read_direct

gitignore-build
Palmer Dabbelt 2017-06-12 14:04:21 -07:00
parent 1a69308621
commit 099a3020d2
1 changed files with 5 additions and 5 deletions

View File

@ -542,8 +542,8 @@ static int register_write_direct(struct target *target, unsigned number,
int exec_out = riscv_program_exec(&program, target); int exec_out = riscv_program_exec(&program, target);
if (exec_out != ERROR_OK) { if (exec_out != ERROR_OK) {
LOG_ERROR("Unable to execute program"); riscv013_clear_abstract_error(target);
return exec_out; return ERROR_FAIL;
} }
return ERROR_OK; return ERROR_OK;
@ -575,8 +575,8 @@ static int register_read_direct(struct target *target, uint64_t *value, uint32_t
int exec_out = riscv_program_exec(&program, target); int exec_out = riscv_program_exec(&program, target);
if (exec_out != ERROR_OK) { if (exec_out != ERROR_OK) {
LOG_ERROR("Unable to execute program"); riscv013_clear_abstract_error(target);
return exec_out; return ERROR_FAIL;
} }
*value = 0; *value = 0;
@ -679,7 +679,7 @@ static int init_target(struct command_context *cmd_ctx,
info->ac_busy_delay = 0; info->ac_busy_delay = 0;
target->reg_cache = calloc(1, sizeof(*target->reg_cache)); target->reg_cache = calloc(1, sizeof(*target->reg_cache));
target->reg_cache->name = "RISC-V registers"; target->reg_cache->name = "RISC-V Registers";
target->reg_cache->num_regs = GDB_REGNO_COUNT; target->reg_cache->num_regs = GDB_REGNO_COUNT;
target->reg_cache->reg_list = calloc(GDB_REGNO_COUNT, sizeof(struct reg)); target->reg_cache->reg_list = calloc(GDB_REGNO_COUNT, sizeof(struct reg));