aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2023-09-08 09:22:10 -0700
committerGitHub <noreply@github.com>2023-09-08 09:22:10 -0700
commit53f21336c4794f94b47e3219a5ad7eec20fa3eab (patch)
treed60cab5e21452e3f94071bc358105077f312c84e
parent42dcc99026b3e715572ddb204c74df4cdf193781 (diff)
parent1936dbd6cffd130f71b18ea38585c03ab9418b18 (diff)
downloadriscv-openocd-53f21336c4794f94b47e3219a5ad7eec20fa3eab.zip
riscv-openocd-53f21336c4794f94b47e3219a5ad7eec20fa3eab.tar.gz
riscv-openocd-53f21336c4794f94b47e3219a5ad7eec20fa3eab.tar.bz2
Merge pull request #912 from MarekVCodasip/make-unknown-semihosting-error
target/riscv_semihosting: Make the unknown operation number an error
-rw-r--r--src/target/riscv/riscv_semihosting.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/target/riscv/riscv_semihosting.c b/src/target/riscv/riscv_semihosting.c
index 15c3d60..9c708c8 100644
--- a/src/target/riscv/riscv_semihosting.c
+++ b/src/target/riscv/riscv_semihosting.c
@@ -109,13 +109,13 @@ enum semihosting_result riscv_semihosting(struct target *target, int *retval)
result = riscv_get_register(target, &r0, GDB_REGNO_A0);
if (result != ERROR_OK) {
- LOG_TARGET_DEBUG(target, " -> ERROR (couldn't read a0)");
+ LOG_TARGET_ERROR(target, "Could not read semihosting operation code (register a0)");
return SEMIHOSTING_ERROR;
}
result = riscv_get_register(target, &r1, GDB_REGNO_A1);
if (result != ERROR_OK) {
- LOG_TARGET_DEBUG(target, " -> ERROR (couldn't read a1)");
+ LOG_TARGET_ERROR(target, "Could not read semihosting operation code (register a1)");
return SEMIHOSTING_ERROR;
}
@@ -134,7 +134,7 @@ enum semihosting_result riscv_semihosting(struct target *target, int *retval)
}
} else {
/* Unknown operation number, not a semihosting call. */
- LOG_TARGET_DEBUG(target, " -> NONE (unknown operation number)");
+ LOG_TARGET_ERROR(target, "Unknown semihosting operation requested (op = 0x%x)", semihosting->op);
return SEMIHOSTING_NONE;
}
}