qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cannot reverse debug


From: Marc Petit-Huguenin
Subject: Cannot reverse debug
Date: Tue, 30 Jan 2024 07:00:53 -0800
User-agent: Mozilla Thunderbird

Hello,

I use Debian's QEMU 8.2.0+ds-5 and GDB 13.2-1 with a minimal kernel and an 
initramfs containing just Busybox 1.36.1.  I record using the following command 
line:

....
qemu-system-x86_64 \
-display gtk \
-icount shift=7,rr=record,rrfile=replay.bin \
-drive file=vmstate.qcow2,if=none,snapshot=on,id=img \
-drive driver=blkreplay,if=none,image=img,id=img-blkreplay \
-device ide-hd,drive=img-blkreplay \
-netdev user,id=net1,hostfwd=udp::1053-10.0.2.15:53 \
-device e1000,netdev=net1 \
-object filter-replay,id=replay,netdev=net1 \
-kernel linux-source-6.6/arch/x86_64/boot/bzImage \
-initrd initramfs.img \
-append "console=ttyS0 root=/ init=/init"
....

I then replay using the following command line:

....
qemu-system-x86_64 \
-s \
-S \
-display gtk \
-icount shift=10,rr=replay,rrfile=replay.bin \
-drive file=vmstate.qcow2,if=none,snapshot=on,id=img \
-drive driver=blkreplay,if=none,image=img,id=img-blkreplay \
-device ide-hd,drive=img-blkreplay \
-netdev user,id=net1,hostfwd=udp::1053-10.0.2.15:53 \
-device e1000,netdev=net1 \
-object filter-replay,id=replay,netdev=net1 \
-kernel linux-source-6.6/arch/x86_64/boot/bzImage \
-initrd initramfs.img \
-append "console=ttyS0 root=/ init=/init"
....

I then connect gdb, install two breakpoints in user space, and continue the 
execution.  The code is executed until the first breakpoint.  I continue, and 
the code is executed until the second breakpoint.  So far so good.

Then I execute reverse-continue, but the code never goes back to the first 
breakpoint.  `info replay` is stuck with:

Replaying execution 'replay.bin': instruction count = 0

What am I doing wrong?

-- 
Marc Petit-Huguenin
Email: marc@petit-huguenin.org
Blog: https://marc.petit-huguenin.org
Profile: https://www.linkedin.com/in/petithug

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]