From: Brendan J <bhenryj0117@googlemail.com>
To: gdb@sourceware.org
Subject: Fwd: Can GDB interact with serial ports on remote targets?
Date: Fri, 20 Feb 2015 14:27:00 -0000 [thread overview]
Message-ID: <CAJUwWUMX_qowt2ePjCbXKcyhmve01L9a-rz5Oa9QdbA1vj9ojA@mail.gmail.com> (raw)
In-Reply-To: <CAJUwWUNyZ=CYr9xL0h5kD0UABpy12LS1hO-hXhwM6-aTh946Zg@mail.gmail.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 [1].
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).
Thanks,
Brendan
PS: I'm using arm-none-eabi-gdb, in case that happens to be relevant.
[1] https://sourceware.org/gdb/onlinedocs/gdb/Input_002fOutput.html
next parent reply other threads:[~2015-02-20 14:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAJUwWUNyZ=CYr9xL0h5kD0UABpy12LS1hO-hXhwM6-aTh946Zg@mail.gmail.com>
2015-02-20 14:27 ` Brendan J [this message]
2015-02-20 15:14 ` Luis Machado
2015-02-20 15:45 ` Brendan J
2015-02-20 15:56 ` Luis Machado
2015-02-20 16:21 ` Paul_Koning
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJUwWUMX_qowt2ePjCbXKcyhmve01L9a-rz5Oa9QdbA1vj9ojA@mail.gmail.com \
--to=bhenryj0117@googlemail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox