target: Add some info messages about examination process.

These messages helps to clarify current status of examination process

Change-Id: I5d93903c4680deed2c1bf707d8f7ef0b48ffdc9a
Signed-off-by: Kirill Radkin <kirill.radkin@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8013
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Kirill Radkin 2023-10-31 18:24:35 +03:00 committed by Antonio Borneo
parent 4003762177
commit 0ce08ec858
1 changed files with 5 additions and 0 deletions

View File

@ -675,10 +675,14 @@ static int default_check_reset(struct target *target)
* Keep in sync */ * Keep in sync */
int target_examine_one(struct target *target) int target_examine_one(struct target *target)
{ {
LOG_TARGET_DEBUG(target, "Examination started");
target_call_event_callbacks(target, TARGET_EVENT_EXAMINE_START); target_call_event_callbacks(target, TARGET_EVENT_EXAMINE_START);
int retval = target->type->examine(target); int retval = target->type->examine(target);
if (retval != ERROR_OK) { if (retval != ERROR_OK) {
LOG_TARGET_ERROR(target, "Examination failed");
LOG_TARGET_DEBUG(target, "examine() returned error code %d", retval);
target_reset_examined(target); target_reset_examined(target);
target_call_event_callbacks(target, TARGET_EVENT_EXAMINE_FAIL); target_call_event_callbacks(target, TARGET_EVENT_EXAMINE_FAIL);
return retval; return retval;
@ -687,6 +691,7 @@ int target_examine_one(struct target *target)
target_set_examined(target); target_set_examined(target);
target_call_event_callbacks(target, TARGET_EVENT_EXAMINE_END); target_call_event_callbacks(target, TARGET_EVENT_EXAMINE_END);
LOG_TARGET_INFO(target, "Examination succeed");
return ERROR_OK; return ERROR_OK;
} }