[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot reverse debug
From: |
Marc Petit-Huguenin |
Subject: |
Re: Cannot reverse debug |
Date: |
Sun, 4 Feb 2024 09:50:18 -0800 |
User-agent: |
Mozilla Thunderbird |
Maybe someone can give some pointers on how to debug the problem here?
Thanks.
On 1/30/24 07:00, Marc Petit-Huguenin wrote:
> 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
OpenPGP_signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Cannot reverse debug,
Marc Petit-Huguenin <=