]> git.sur5r.net Git - openocd/commitdiff
armv8_dpm: fix exception handling
authorMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Fri, 17 Feb 2017 15:22:52 +0000 (16:22 +0100)
committerPaul Fertser <fercerpav@gmail.com>
Fri, 24 Feb 2017 09:50:14 +0000 (09:50 +0000)
after handling of an exception in debug state, immediately
restore the original core state.

Change-Id: Ie53b63c9f19815f717f4df4390fbc13f0a204cc2
Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
Reviewed-on: http://openocd.zylin.com/3996
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/target/armv8_dpm.c

index e5d10df6e791d6a6e16119bba3d446d230e15e1c..f4e7a07996c651546c92812b04f4f085a76305cd 100644 (file)
@@ -1312,6 +1312,8 @@ void armv8_dpm_handle_exception(struct arm_dpm *dpm)
        core_state = armv8_dpm_get_core_state(dpm);
        armv8_select_opcodes(armv8, core_state == ARM_STATE_AARCH64);
        armv8_select_reg_access(armv8, core_state == ARM_STATE_AARCH64);
+
+       armv8_dpm_modeswitch(dpm, ARM_MODE_ANY);
 }
 
 /*----------------------------------------------------------------------*/