Merge pull request #912 from MarekVCodasip/make-unknown-semihosting-error

target/riscv_semihosting: Make the unknown operation number an error
This commit is contained in:
Tim Newsome 2023-09-08 09:22:10 -07:00 committed by GitHub
commit 53f21336c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}
}