target: reexamine after polling succeeds again

If polling was failing, it likely meant that either the target was
disconnected or rebooted. In the latter case it needs to be reexamined
to be properly configured for the debug session, so do it just in
case.

Reported-by: Tim Sander <tim@krieglstein.org>
Tested-by: Tim Sander <tim@krieglstein.org>
Change-Id: I5b067c18d9276d4e86cc59739f196ae7d0931622
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2151
Tested-by: jenkins
Reviewed-by: Tim Sander <tim@krieglstein.org>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
Paul Fertser 2014-05-23 15:17:31 +04:00 committed by Andreas Fritiofson
parent 8f9cea457d
commit cd74dd2891

View File

@ -2418,8 +2418,12 @@ static int handle_target(void *priv)
return retval;
}
/* Since we succeeded, we reset backoff count */
if (target->backoff.times > 0)
LOG_USER("Polling target %s succeeded again", target_name(target));
if (target->backoff.times > 0) {
LOG_USER("Polling target %s succeeded again, trying to reexamine", target_name(target));
target_reset_examined(target);
target_examine_one(target);
}
target->backoff.times = 0;
}
}