From: openocd-gerrit <ope...@us...> - 2023-10-14 12:07:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via c7d1f0ddabb301e00738686671b939bb92a06ed9 (commit) from 14b1b35e4247091f1e90311f9b61805ae1f6f34d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c7d1f0ddabb301e00738686671b939bb92a06ed9 Author: Parshintsev Anatoly <ana...@sy...> Date: Sun Jul 30 15:35:45 2023 +0300 target: check if target is not examined on reg command Change-Id: I46093c85374986a36d10eaac38b98bd5e05835ca Signed-off-by: Parshintsev Anatoly <ana...@sy...> Reviewed-on: https://review.openocd.org/c/openocd/+/7841 Reviewed-by: Jan Matyas <jan...@co...> Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins Reviewed-by: Marek Vrbka <mar...@co...> diff --git a/src/target/target.c b/src/target/target.c index dfa86fdb3..10d0088d5 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_TARGET_NOT_EXAMINED; + } struct reg *reg = NULL; /* list all available registers for the current target */ ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- Main OpenOCD repository |