On 1/8/22 7:09 AM, Ard Biesheuvel wrote:
When running under KVM, we may decide to run the CPU in 32-bit mode, by
setting the 'aarch64=off' CPU option. In this case, we need to switch to
the 32-bit version of the GDB stub too, so that GDB has the correct view
of the CPU state. Without this, GDB debugging does not work at all, and
errors out upon connecting to the target with a mysterious 'g' packet
length error.

Cc: Richard Henderson<richard.hender...@linaro.org>
Cc: Peter Maydell<peter.mayd...@linaro.org>
Cc: Alex Bennee<alex.ben...@linaro.org>
Signed-off-by: Ard Biesheuvel<a...@kernel.org>
---
v2: refactor existing CPUClass::gdb_... member assignments for the
     32-bit code so we can reuse it for the 64-bit code

  target/arm/cpu.c   | 16 +++++++++++-----
  target/arm/cpu.h   |  2 ++
  target/arm/cpu64.c |  3 +++
  3 files changed, 16 insertions(+), 5 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to