qemu-patch-raspberry4/accel/tcg
Luc Michel a7ba744f40 tcg/cpu-exec: precise single-stepping after an exception
When single-stepping with a debugger attached to QEMU, and when an
exception is raised, the debugger misses the first instruction after the
exception:

$ qemu-system-aarch64 -M virt -display none -cpu cortex-a53 -s -S

$ aarch64-linux-gnu-gdb
GNU gdb (GDB) 9.2
[...]
(gdb) tar rem :1234
Remote debugging using :1234
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x0000000000000000 in ?? ()
(gdb) # writing nop insns to 0x200 and 0x204
(gdb) set *0x200 = 0xd503201f
(gdb) set *0x204 = 0xd503201f
(gdb) # 0x0 address contains 0 which is an invalid opcode.
(gdb) # The CPU should raise an exception and jump to 0x200
(gdb) si
0x0000000000000204 in ?? ()

With this commit, the same run steps correctly on the first instruction
of the exception vector:

(gdb) si
0x0000000000000200 in ?? ()

Buglink: https://bugs.launchpad.net/qemu/+bug/757702
Signed-off-by: Luc Michel <luc.michel@greensocs.com>
Message-Id: <20200716193947.3058389-1-luc.michel@greensocs.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2020-07-16 14:08:29 -07:00
..
atomic_common.inc.c tcg: let plugins instrument virtual memory accesses 2019-10-28 15:12:38 +00:00
atomic_template.h trace: Remove trace_mem_build_info_no_se_[bl]e 2020-01-15 15:13:09 -10:00
cpu-exec-common.c qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h 2019-06-11 20:22:09 +02:00
cpu-exec.c tcg/cpu-exec: precise single-stepping after an exception 2020-07-16 14:08:29 -07:00
cputlb.c cputlb: ensure we save the IOTLB data in case of reset 2020-07-15 11:52:43 +01:00
Makefile.objs plugin-gen: add module for TCG-related code 2019-10-28 15:12:38 +00:00
plugin-gen.c plugin-gen: add module for TCG-related code 2019-10-28 15:12:38 +00:00
plugin-helpers.h plugin-gen: add module for TCG-related code 2019-10-28 15:12:38 +00:00
tcg-all.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
tcg-runtime-gvec.c tcg: Implement gvec support for rotate by vector 2020-06-02 08:42:37 -07:00
tcg-runtime.c tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
tcg-runtime.h tcg: Implement gvec support for rotate by vector 2020-06-02 08:42:37 -07:00
trace-events accel/tcg: don't disable exec_tb trace events 2020-05-15 15:25:16 +01:00
translate-all.c osdep: Make MIN/MAX evaluate arguments only once 2020-06-26 09:39:39 -04:00
translate-all.h cputlb: Pass retaddr to tb_check_watchpoint 2019-09-25 10:56:28 -07:00
translator.c qemu_log_lock/unlock now preserves the qemu_logfile handle. 2019-12-18 20:18:02 +00:00
user-exec-stub.c hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
user-exec.c accel/tcg: Provide a NetBSD specific aarch64 cpu_signal_handler 2020-06-02 08:42:37 -07:00