This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdbserver can't run over serial
- From: Jim Blandy <jimb at codesourcery dot com>
- To: "xchen" <xchen at sunrisetelecom dot com dot cn>
- Cc: <gdb at sourceware dot org>
- Date: Tue, 02 Oct 2007 14:49:13 -0700
- Subject: Re: gdbserver can't run over serial
- References: <20070929073901.E3B7911F80B@lax-gw07.mroute.net>
"xchen" <xchen at sunrisetelecom.com.cn> writes:
> Firstly gdb connected with gdbserver, then gdbserver was silent.
> Remotebaud was 9600 and remotedevice was /dev/ttyS0. I set debug remote 1
> and see lots of msg. But I don't understand it at all. Belowed is snapshot
>
> ./gdbserver /dev/ttyS0 hellogdb
> Process hellogdb created; pid = 245
> Remote debugging using /dev/ttyS0
If you're curious, the remote protocol is documented in Appendix D of
the GDB manual. Your transcript at least shows that gdb and gdbserver
are talking to each other happily.
If you were to simply run 'hellogdb' instead of './gdbserver
... hellogdb', where would hellogdb's stdout go? Would it go to
/dev/ttyS0 too? If so: GDB silently consumes any extraneous
characters it receives between packets, so GDB may be simply eating
your output.