hla_target: fix adapter_poll() to preserve TARGET_DEBUG_RUNNING state
Without this change TARGET_DEBUG_RUNNING changes to TARGET_RUNNING after adapter_poll() Change-Id: I1c965a43527b50fa723d78fb6eae56585a7ede03 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4820 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
fc348bc086
commit
d9cb5593cd
|
@ -470,6 +470,9 @@ static int adapter_poll(struct target *target)
|
||||||
if (prev_target_state == state)
|
if (prev_target_state == state)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
|
|
||||||
|
if (prev_target_state == TARGET_DEBUG_RUNNING && state == TARGET_RUNNING)
|
||||||
|
return ERROR_OK;
|
||||||
|
|
||||||
target->state = state;
|
target->state = state;
|
||||||
|
|
||||||
if (state == TARGET_HALTED) {
|
if (state == TARGET_HALTED) {
|
||||||
|
|
Loading…
Reference in New Issue