mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
target/arm: Assert thumb pc is aligned
Misaligned thumb PC is architecturally impossible. Assert is better than proceeding, in case we've missed something somewhere. Expand a comment about aligning the pc in gdbstub. Fail an incoming migrate if a thumb pc is misaligned. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
ee03027a2c
commit
7055fe4baf
3 changed files with 20 additions and 2 deletions
|
@ -77,8 +77,13 @@ int arm_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
|
|||
|
||||
tmp = ldl_p(mem_buf);
|
||||
|
||||
/* Mask out low bit of PC to workaround gdb bugs. This will probably
|
||||
cause problems if we ever implement the Jazelle DBX extensions. */
|
||||
/*
|
||||
* Mask out low bits of PC to workaround gdb bugs.
|
||||
* This avoids an assert in thumb_tr_translate_insn, because it is
|
||||
* architecturally impossible to misalign the pc.
|
||||
* This will probably cause problems if we ever implement the
|
||||
* Jazelle DBX extensions.
|
||||
*/
|
||||
if (n == 15) {
|
||||
tmp &= ~1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue