[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-discuss
Subject:    [Qemu-discuss] virtio-serial and gdbserver disturbing each other
From:       Benjamin Beichler <Benjamin.Beichler () uni-rostock ! de>
Date:       2016-05-27 17:35:12
Message-ID: 8e614c09-e354-4639-61aa-b7ad29b650e0 () googlemail ! com
[Download RAW message or body]

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 ?




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic