This is the mail archive of the
mailing list for the GDB project.
Fwd: Can GDB interact with serial ports on remote targets?
- From: Brendan J <bhenryj0117 at googlemail dot com>
- To: gdb at sourceware dot org
- Date: Fri, 20 Feb 2015 14:27:24 +0000
- Subject: Fwd: Can GDB interact with serial ports on remote targets?
- Authentication-results: sourceware.org; auth=none
- References: <CAJUwWUNyZ=CYr9xL0h5kD0UABpy12LS1hO-hXhwM6-aTh946Zg at mail dot gmail dot com>
I am using GDB to debug a remote target: I start GDB then type `target
remote foo:1234`. I do I/O with the target via a serial port. So I
have to have two terminals open: one with picocom (connected to
something like /dev/ttyUSB0) and one with GDB (connected to OpenOCD
via a socket). To be clear: the debug connection is *not over the
serial port*, it's over a totally separate JTAG interface.
As you know, when you debug a "normal" (i.e. not "remote") inferior in
GDB, its stdin and stdout are multiplexed into GDB's TTY so that you
can interact with it while it's running .
Is it possible to achieve that for a remote target - that is: can GDB
connect to the serial port itself so I can do I/O with the target from
within the GDB session?
If not, is this something that might be feasible? Maybe GDB could
multiplex its I/O so that while the inferior is running it passes
characters to/from an external tool like picocom? (As you can see I'm
fairly ignorant about this whole issue at the moment).
PS: I'm using arm-none-eabi-gdb, in case that happens to be relevant.