hla_target: Update target state when polling
commit3da319e8b14df3cc33d883a5bd3091e4e4c9da88
authorSergey A. Borshch <sb-sf@users.sourceforge.net>
Mon, 7 Oct 2013 08:45:40 +0000 (7 11:45 +0300)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 15 Oct 2013 20:41:18 +0000 (15 20:41 +0000)
tree6fd8f1f48967794c5a0db67e467cde4ce614fff9
parentff5ec942d80a34e20b5a3ca3328f7e6a55fb309b
hla_target: Update target state when polling

    Polling target does not change stste information
    except if new state is TARGET_HALTED.
    Connecting to the runing target result in target->state
    not updated with retrieved value and remains "UNKNOWN"
    until 'halt' command issued.

Change-Id: I803d6c0207f7f8699e648779d1df342c9ee7315a
Signed-off-by: Sergey A. Borshch <sb-sf@users.sourceforge.net>
Reviewed-on: http://openocd.zylin.com/1680
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/hla_target.c