> On 14 Jan 2023, at 17.13, francesco.cag...@gmail.com wrote: > > From: Francesco Cagnin <fcag...@quarkslab.com> > > Support is added for single-stepping, software breakpoints, hardware > breakpoints and watchpoints. The code has been structured like the KVM > counterpart (and many parts are basically identical). > > Guests can be debugged through the gdbstub. > > While guest debugging is enabled, the guest can still read and write the > DBG*_EL1 registers but they don't have any effect. > > Signed-off-by: Francesco Cagnin <fcag...@quarkslab.com> > --- > accel/hvf/hvf-accel-ops.c | 123 ++++++++ > accel/hvf/hvf-all.c | 24 ++ > cpu.c | 3 + > include/sysemu/hvf.h | 29 ++ > include/sysemu/hvf_int.h | 1 + > target/arm/hvf/hvf.c | 631 +++++++++++++++++++++++++++++++++++++- > 6 files changed, 809 insertions(+), 2 deletions(-) >
It seems v3 has a regression in regards to BRK instructions that I cannot reproduce with v2. If I start QEMU and GDB with the Linux kernel (v6.0-rc5), and set a software breakpoint at `bio_split` (probably not specific to this function), I see messages in stdout like this: [ 4.663981] Unexpected kernel BRK exception at EL1 [ 4.664650] Internal error: BRK handler: f2000000 [#1] PREEMPT SMP ... Maybe the software breakpoints aren't removed/reapplied correctly in v3? — Mads Ynddal