X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Friscv%2Friscv-011.c;h=bd3f159fbeebd213683cb8eefc68867f8f695579;hp=498da5ad5a207c08c154b363169ec5855037bafd;hb=a851b91c4c1db76dd1e26a7d1a99124ad456b020;hpb=d537cce7ef49bf2f4bc81cf016f784a9adf2537a diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c index 498da5ad5a..bd3f159fbe 100644 --- a/src/target/riscv/riscv-011.c +++ b/src/target/riscv/riscv-011.c @@ -1788,6 +1788,8 @@ static riscv_error_t handle_halt_routine(struct target *target) break; default: assert(0); + LOG_ERROR("Got invalid register result %d", result); + goto error; } if (riscv_xlen(target) == 32) { reg_cache_set(target, reg, data & 0xffffffff); @@ -1804,6 +1806,8 @@ static riscv_error_t handle_halt_routine(struct target *target) } } + scans_delete(scans); + if (dbus_busy) { increase_dbus_busy_delay(target); return RE_AGAIN; @@ -1817,8 +1821,6 @@ static riscv_error_t handle_halt_routine(struct target *target) info->dpc = reg_cache_get(target, CSR_DPC); info->dcsr = reg_cache_get(target, CSR_DCSR); - scans_delete(scans); - cache_invalidate(target); return RE_OK;