diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2018-12-25 21:38:23 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-01-27 20:58:03 +0000 |
commit | d9cb5593cd4855fba7ab76a7db2f2db6e7978f67 (patch) | |
tree | 2f37a3bd768d31b1d4be1d572dc276cbabe19aa6 /src/target/hla_target.c | |
parent | fc348bc08648f492c6e5d63d47c0f7a1e6e0b3b2 (diff) | |
download | riscv-openocd-d9cb5593cd4855fba7ab76a7db2f2db6e7978f67.zip riscv-openocd-d9cb5593cd4855fba7ab76a7db2f2db6e7978f67.tar.gz riscv-openocd-d9cb5593cd4855fba7ab76a7db2f2db6e7978f67.tar.bz2 |
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>
Diffstat (limited to 'src/target/hla_target.c')
-rw-r--r-- | src/target/hla_target.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/target/hla_target.c b/src/target/hla_target.c index 567a61d..4bf7bdc 100644 --- a/src/target/hla_target.c +++ b/src/target/hla_target.c @@ -470,6 +470,9 @@ static int adapter_poll(struct target *target) if (prev_target_state == state) return ERROR_OK; + if (prev_target_state == TARGET_DEBUG_RUNNING && state == TARGET_RUNNING) + return ERROR_OK; + target->state = state; if (state == TARGET_HALTED) { |