aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Negreanu <adrian.negreanu@nxp.com>2020-11-05 11:56:16 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2020-11-07 20:50:16 +0000
commit850e85fa6fec275cb9f2bc76faefee51136e878e (patch)
treea4907a623e61556176a93c244f75ee2f06e9d1fd
parent9cce6b3c763e883faea545b9ffbda19ec8164804 (diff)
downloadriscv-openocd-850e85fa6fec275cb9f2bc76faefee51136e878e.zip
riscv-openocd-850e85fa6fec275cb9f2bc76faefee51136e878e.tar.gz
riscv-openocd-850e85fa6fec275cb9f2bc76faefee51136e878e.tar.bz2
semihosting: print the semihosting operation id
Change-Id: If5c3568bd1c99a48ac492137f48da0d9764efe14 Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com> Reviewed-on: http://openocd.zylin.com/5923 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li> Reviewed-by: Tim Newsome <tim@sifive.com>
-rw-r--r--src/target/arm_semihosting.c2
-rw-r--r--src/target/riscv/riscv_semihosting.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/target/arm_semihosting.c b/src/target/arm_semihosting.c
index 61f1e78..723be57 100644
--- a/src/target/arm_semihosting.c
+++ b/src/target/arm_semihosting.c
@@ -315,7 +315,7 @@ int arm_semihosting(struct target *target, int *retval)
if (0 <= semihosting->op && semihosting->op <= 0x31) {
*retval = semihosting_common(target);
if (*retval != ERROR_OK) {
- LOG_ERROR("Failed semihosting operation");
+ LOG_ERROR("Failed semihosting operation (0x%02X)", semihosting->op);
return 0;
}
} else {
diff --git a/src/target/riscv/riscv_semihosting.c b/src/target/riscv/riscv_semihosting.c
index 99d6c77..c0e81ea 100644
--- a/src/target/riscv/riscv_semihosting.c
+++ b/src/target/riscv/riscv_semihosting.c
@@ -140,7 +140,7 @@ semihosting_result_t riscv_semihosting(struct target *target, int *retval)
if (0 <= semihosting->op && semihosting->op <= 0x31) {
*retval = semihosting_common(target);
if (*retval != ERROR_OK) {
- LOG_ERROR("Failed semihosting operation");
+ LOG_ERROR("Failed semihosting operation (0x%02X)", semihosting->op);
return SEMI_ERROR;
}
} else {