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

 

Reply via email to