|
From: | ckim |
Subject: | RE: how to debug/analyze qemu code while running OS on the virtual machine? |
Date: | Fri, 6 Aug 2021 18:15:24 +0900 |
Sorry, I soon found when I run the application on the OS, the breakpoint work in the debugger and the debugger command and source window comes back. I need to occasionally type ctrl-l to see the source code clearly. Thanks! Chan Kim From: ckim@etri.re.kr <ckim@etri.re.kr> Hello folks, Wish you all a healthy summer in this COVID-19 season. I’m running ubuntu on a virtual machine (arm64 virt machine with an added peripheral). I want to follow qemu code path while running an application/driver on the virtual machine. This is the command I tried. Gdb -command=gdb_script_qemu –args qemu-system-aarch64 -nographic -machine ab21q,gic-version=max,iommu=smmuv3 -m 1G -cpu max -smp 4 \ -netdev user,id=vnet,hostfwd=:127.0.0.1:0-:22 -device virtio-net-pci,netdev=vnet \ -drive file=ab21q-ubuntu-20.04-image.img,if=none,id=drive0,cache=writeback -device virtio-blk,drive=drive0,bootindex=0 \ -drive file=ubuntu-20.04-mini.iso,if=none,id=drive1,cache=writeback -device virtio-blk,drive=drive1,bootindex=1 \ -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash As soon as the debugger comes up, I give command ‘layout src’. Then I can see the qemu source code in the source window. I can use the command window of gdb. (There are already some breakpoints setup in gdb_script_qemu) Then, I give ‘r’ command, the program runs and immediately the source window disappears and see a screen showing ubuntu booting. I see the login prompt and I can login to the shell. Now everything I enter is interpreted as shell command. Where did the gdb go? How can I get back the gdb command window or source window? I think people developing qemu should know how to do this. Can anyone help me with this problem? Thanks! Chan Kim |
[Prev in Thread] | Current Thread | [Next in Thread] |