qemu-discuss
[Top][All Lists]
Advanced

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

[Qemu-discuss] virtio-serial and gdbserver disturbing each other


From: Benjamin Beichler
Subject: [Qemu-discuss] virtio-serial and gdbserver disturbing each other
Date: Fri, 27 May 2016 19:35:12 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

Hi,

I try to debug the linux kernel of a QEMU-Machine with 2 forwarded
serial ports. Therefore I use the following cmd:

qemu-system-x86_64 -enable-kvm -hda ubuntu_14_LTS_64bit_2.img -m 2048
-smp 2 -device virtio-serial -chardev
socket,path=/tmp/virtPort,server,nowait,id=virtPort -chardev
socket,path=/tmp/virtPort2,server,nowait,id=virtPort2 -device
virtserialport,chardev=virtPort,name=org.linux-kvm.port.0 -device
virtserialport,chardev=virtPort2,name=org.linux-kvm.port.1 -qmp
unix:./qmp-sock,server,nowait -fsdev
local,security_model=none,id=fsdev0,path=/home/user/guest -device
virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=host_folder -kernel
~/git/linux-stable/arch/x86_64/boot/bzImage -append "root=/dev/sda1" -s

If the machine boots and I attach gdb via "target remote :1234"
everything runs fine. Especially when I stop the machine, both threads
stop and wait for further debugging commands.

But when I start the program at host, which connects to the both serial
ports, the debugging stops to do useful things, e.g. if the machine was
stopped, it starts to run or starts and stops often. At least it is
impossible to debug the kernel.

As far as I kill the program at the host, which connects to these ports,
the debugger start to work again.

For me it seems to be, that the gdbserver at qemu uses somehow a virtual
serial connection, which is mixed up with the other connections. Is that
possible and do you have any suggestions ?





reply via email to

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