target: check if target is not examined on reg command
Change-Id: I46093c85374986a36d10eaac38b98bd5e05835ca Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7841 Reviewed-by: Jan Matyas <jan.matyas@codasip.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Reviewed-by: Marek Vrbka <marek.vrbka@codasip.com>
This commit is contained in:
parent
14b1b35e42
commit
c7d1f0ddab
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue