This is an automated email from Gerrit. "Anatoly Parshintsev <kupokupokup...@gmail.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7841
-- gerrit commit df46b4a18d213262f272a68d47ef3cf617a993c1 Author: Parshintsev Anatoly <anatoly.parshint...@syntacore.com> Date: Sun Jul 30 15:35:45 2023 +0300 if target is not examined reg command should fail Change-Id: I46093c85374986a36d10eaac38b98bd5e05835ca Signed-off-by: Parshintsev Anatoly <anatoly.parshint...@syntacore.com> diff --git a/src/target/target.c b/src/target/target.c index 89eaa23d84..ab20ff8420 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -3052,6 +3052,10 @@ COMMAND_HANDLER(handle_reg_command) LOG_DEBUG("-"); struct target *target = get_current_target(CMD_CTX); + if (!target_was_examined(target)) { + LOG_ERROR("Target not examined yet"); + return ERROR_FAIL; + } struct reg *reg = NULL; /* list all available registers for the current target */ --