diff options
-rw-r--r-- | src/target/hla_target.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/target/hla_target.c b/src/target/hla_target.c index 568cc88..abbc1b1 100644 --- a/src/target/hla_target.c +++ b/src/target/hla_target.c @@ -463,11 +463,12 @@ static int adapter_poll(struct target *target) return ERROR_TARGET_FAILURE; } - if (target->state == state) + if (prev_target_state == state) return ERROR_OK; + target->state = state; + if (state == TARGET_HALTED) { - target->state = state; int retval = adapter_debug_entry(target); if (retval != ERROR_OK) |