Hello,
My current installation is Ubuntu 20.04 and QEMU emulator version 6.0.0. I'm trying to attach gdb to the guest via a serial port. Using a default /dev/ttyS0 I tried to run QEMU as follows
$ sudo qemu-system-x86_64 -serial /dev/ttyS0 -gdb /dev/ttyS0 -S
So when attaching from gdb I got
(gdb) target remote /dev/ttyS0
get_tty_state failed: Input/output error
set_tty_state failed: Input/output error
Remote debugging using /dev/ttyS0
Remote communication error. Target disconnected.: Input/output error.
Is there a way to open a serial port to use for GDB debugging? If so, could you please suggest a possible solution?
Regards,
Dmitrii Bundin