Skip to content

Commit 099a302

Browse files
Clear abstract errors from register_read_direct
1 parent 1a69308 commit 099a302

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/target/riscv/riscv-013.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,8 @@ static int register_write_direct(struct target *target, unsigned number,
542542

543543
int exec_out = riscv_program_exec(&program, target);
544544
if (exec_out != ERROR_OK) {
545-
LOG_ERROR("Unable to execute program");
546-
return exec_out;
545+
riscv013_clear_abstract_error(target);
546+
return ERROR_FAIL;
547547
}
548548

549549
return ERROR_OK;
@@ -575,8 +575,8 @@ static int register_read_direct(struct target *target, uint64_t *value, uint32_t
575575

576576
int exec_out = riscv_program_exec(&program, target);
577577
if (exec_out != ERROR_OK) {
578-
LOG_ERROR("Unable to execute program");
579-
return exec_out;
578+
riscv013_clear_abstract_error(target);
579+
return ERROR_FAIL;
580580
}
581581

582582
*value = 0;
@@ -679,7 +679,7 @@ static int init_target(struct command_context *cmd_ctx,
679679
info->ac_busy_delay = 0;
680680

681681
target->reg_cache = calloc(1, sizeof(*target->reg_cache));
682-
target->reg_cache->name = "RISC-V registers";
682+
target->reg_cache->name = "RISC-V Registers";
683683
target->reg_cache->num_regs = GDB_REGNO_COUNT;
684684

685685
target->reg_cache->reg_list = calloc(GDB_REGNO_COUNT, sizeof(struct reg));

0 commit comments

Comments
 (0)