aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-06-12 14:04:21 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-06-12 14:15:55 -0700
commitee1c404ef457f37aeeb26804421222d86b1b242f (patch)
treeeb2c4d73396d21ad2e0423d97092e9f425352fb7
parent459b39ec67bbbe2ea0a192344c5236518da79c65 (diff)
downloadriscv-openocd-ee1c404ef457f37aeeb26804421222d86b1b242f.zip
riscv-openocd-ee1c404ef457f37aeeb26804421222d86b1b242f.tar.gz
riscv-openocd-ee1c404ef457f37aeeb26804421222d86b1b242f.tar.bz2
Clear abstract errors from register_read_direct
-rw-r--r--src/target/riscv/riscv-013.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 63456db..e215fdf 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -543,8 +543,8 @@ static int register_write_direct(struct target *target, unsigned number,
int exec_out = riscv_program_exec(&program, target);
if (exec_out != ERROR_OK) {
- LOG_ERROR("Unable to execute program");
- return exec_out;
+ riscv013_clear_abstract_error(target);
+ return ERROR_FAIL;
}
return ERROR_OK;
@@ -576,8 +576,8 @@ static int register_read_direct(struct target *target, uint64_t *value, uint32_t
int exec_out = riscv_program_exec(&program, target);
if (exec_out != ERROR_OK) {
- LOG_ERROR("Unable to execute program");
- return exec_out;
+ riscv013_clear_abstract_error(target);
+ return ERROR_FAIL;
}
*value = 0;
@@ -680,7 +680,7 @@ static int init_target(struct command_context *cmd_ctx,
info->ac_busy_delay = 0;
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->reg_list = calloc(GDB_REGNO_COUNT, sizeof(struct reg));