Skip to content

Commit

Permalink
target: Add some info messages about examination process.
Browse files Browse the repository at this point in the history
These messages helps to clarify current status of examination process

Change-Id: I5d93903c4680deed2c1bf707d8f7ef0b48ffdc9a
Signed-off-by: Kirill Radkin <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/8013
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
  • Loading branch information
kr-sc authored and borneoa committed Dec 10, 2023
1 parent 4003762 commit 0ce08ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/target/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,10 +675,14 @@ static int default_check_reset(struct target *target)
* Keep in sync */
int target_examine_one(struct target *target)
{
LOG_TARGET_DEBUG(target, "Examination started");

target_call_event_callbacks(target, TARGET_EVENT_EXAMINE_START);

int retval = target->type->examine(target);
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_call_event_callbacks(target, TARGET_EVENT_EXAMINE_FAIL);
return retval;
Expand All @@ -687,6 +691,7 @@ int target_examine_one(struct target *target)
target_set_examined(target);
target_call_event_callbacks(target, TARGET_EVENT_EXAMINE_END);

LOG_TARGET_INFO(target, "Examination succeed");
return ERROR_OK;
}

Expand Down

0 comments on commit 0ce08ec

Please sign in to comment.