AArch64: Fix single stepping of ERET instruction

Previously when single stepping through ERET instruction via GDB
would result in debugger entering the "next" PC after ERET instruction.
When debugging in kernel mode, this will also cause unintended behavior,
because debugger will try to access memory from EL0 point of view.

Backports commit dddbba9943ef6a81c8702e4a50cb0a8b1a4201fe from qemu
This commit is contained in:
Jaroslaw Pelczar 2018-03-04 23:15:23 -05:00 committed by Lioncash
parent 6a951f17ed
commit 7fded6c15c
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -11598,6 +11598,7 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
default:
gen_a64_set_pc_im(dc, dc->pc);
/* fall through */
case DISAS_EXIT:
case DISAS_JUMP:
if (dc->base.singlestep_enabled) {
gen_exception_internal(dc, EXCP_DEBUG);