[Top][All Lists]

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

Open serial port to attach via GDB

From: Dmitrii Bundin
Subject: Open serial port to attach via GDB
Date: Thu, 8 Jul 2021 09:11:42 +0300


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?

Dmitrii Bundin

reply via email to

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