target: restore last run state after profiling
authorChristopher Head <chead@zaber.com>
Fri, 14 Jun 2019 22:35:31 +0000 (15:35 -0700)
committerAntonio Borneo <borneo.antonio@gmail.com>
Fri, 30 Oct 2020 22:01:07 +0000 (22:01 +0000)
commitd05ef53cbd08972f89bd13e8ce2739de68965a05
tree83fdcb7301b4916551cd64655587d04657065be3
parentd3aa2d35363faeec4976b34fd5cb3127820ebc8d
target: restore last run state after profiling

Now that it’s possible to start profiling from either a running or a
halted state, rather than unconditionally halting after profiling
finishes, it makes more sense to restore the processor to whatever state
(running or halted) it was in before profiling started.

Change-Id: If6f6e70a1a365c1ce3b348a306c435c220b8bf12
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5237
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/target/target.c