* gdbserver using serial port
@ 2007-11-02 2:14 Yoriko Komatsuzaki
2007-11-02 2:25 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Yoriko Komatsuzaki @ 2007-11-02 2:14 UTC (permalink / raw)
To: gdb
Hello,
I would like to ask you about gdbserver in case of using serial port.
In gdb-6.6, if I run gdbserver using serial port, the following messages
continue and it can't establish the connection to host gdb.
% gdbserver /dev/ttyS0 a.out
...
Remote debugging using /dev/ttyS0
readchar: Socket operation on non-socket
Remote side has terminated connection. GDBserver will reopen the connection.
Remote debugging using /dev/ttyS0
readchar: Socket operation on non-socket
Remote side has terminated connection. GDBserver will reopen the connection.
Remote debugging using /dev/ttyS0
readchar: Socket operation on non-socket
...
And then in gdb-6.7, the following messages are displayed.
% gdbserver /dev/ttyS0 a.out
Process a.out created; pid = 10696
Remote debugging using /dev/ttyS0
So I ran the host gdb and tried to establish the connection between host
and target, but couldn't establish the connections channel.
In the both cases, if I use the network as the debug channel,
I can use the gdb/gdbserver without any problems.
Do you have any ideas or comments ?
Thank you.
---
Yoriko Komatsuzaki (yoriko@sm.sony.co.jp)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdbserver using serial port
2007-11-02 2:14 gdbserver using serial port Yoriko Komatsuzaki
@ 2007-11-02 2:25 ` Daniel Jacobowitz
2007-11-02 4:12 ` Yoriko Komatsuzaki
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-11-02 2:25 UTC (permalink / raw)
To: Yoriko Komatsuzaki; +Cc: gdb
On Fri, Nov 02, 2007 at 11:14:13AM +0900, Yoriko Komatsuzaki wrote:
> Hello,
>
> I would like to ask you about gdbserver in case of using serial port.
> In gdb-6.6, if I run gdbserver using serial port, the following messages
> continue and it can't establish the connection to host gdb.
Yes, serial support was broken in gdbserver 6.6.
> % gdbserver /dev/ttyS0 a.out
> Process a.out created; pid = 10696
> Remote debugging using /dev/ttyS0
>
> So I ran the host gdb and tried to establish the connection between host
> and target, but couldn't establish the connections channel.
Please be more specific. What does "set debug serial 1" and "set
debug remote 1" before connecting show?
If your console is /dev/ttyS0 and a.out writes to the terminal, you
will need to redirect it, or it will interfere with communication.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdbserver using serial port
2007-11-02 2:25 ` Daniel Jacobowitz
@ 2007-11-02 4:12 ` Yoriko Komatsuzaki
2007-11-02 11:31 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Yoriko Komatsuzaki @ 2007-11-02 4:12 UTC (permalink / raw)
To: gdb
Thank you for your answer.
My environment is a littel special.
On target (gdbserver run), the serial (/dev/ttyS0) is used as the
channel. But on host (gdb run), the usb (/dev/ttyUSB0) is used.
And the host and the target is connected by "the serial/usb
transimission cable".
So I guess that this special hardware environment might affects this
problem.
% gdb
(gdb) set debug remote 1
(gdb) set debug serial 1
(gdb) target remote /dev/ttyUSB0
Remote debugging using /dev/ttyUSB0
Sending packet: $qSupported#37...
Thank you.
---
Yoriko Komatsuzaki (yoriko@sm.sony.co.jp)
> On Fri, Nov 02, 2007 at 11:14:13AM +0900, Yoriko Komatsuzaki wrote:
> > Hello,
> >
> > I would like to ask you about gdbserver in case of using serial port.
> > In gdb-6.6, if I run gdbserver using serial port, the following messages
> > continue and it can't establish the connection to host gdb.
>
> Yes, serial support was broken in gdbserver 6.6.
>
> > % gdbserver /dev/ttyS0 a.out
> > Process a.out created; pid = 10696
> > Remote debugging using /dev/ttyS0
> >
> > So I ran the host gdb and tried to establish the connection between host
> > and target, but couldn't establish the connections channel.
>
> Please be more specific. What does "set debug serial 1" and "set
> debug remote 1" before connecting show?
>
> If your console is /dev/ttyS0 and a.out writes to the terminal, you
> will need to redirect it, or it will interfere with communication.
>
> --
> Daniel Jacobowitz
> CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdbserver using serial port
2007-11-02 4:12 ` Yoriko Komatsuzaki
@ 2007-11-02 11:31 ` Daniel Jacobowitz
2007-11-05 9:53 ` Yoriko Komatsuzaki
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-11-02 11:31 UTC (permalink / raw)
To: Yoriko Komatsuzaki; +Cc: gdb
On Fri, Nov 02, 2007 at 01:11:47PM +0900, Yoriko Komatsuzaki wrote:
>
> Thank you for your answer.
>
> My environment is a littel special.
>
> On target (gdbserver run), the serial (/dev/ttyS0) is used as the
> channel. But on host (gdb run), the usb (/dev/ttyUSB0) is used.
> And the host and the target is connected by "the serial/usb
> transimission cable".
>
> So I guess that this special hardware environment might affects this
> problem.
>
> % gdb
> (gdb) set debug remote 1
> (gdb) set debug serial 1
> (gdb) target remote /dev/ttyUSB0
> Remote debugging using /dev/ttyUSB0
> Sending packet: $qSupported#37...
This looks like either a baud rate problem, or some other complete
failure of serial support on your host. GDB can't read even a single
byte from your target.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdbserver using serial port
2007-11-02 11:31 ` Daniel Jacobowitz
@ 2007-11-05 9:53 ` Yoriko Komatsuzaki
2007-11-05 13:22 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Yoriko Komatsuzaki @ 2007-11-05 9:53 UTC (permalink / raw)
To: gdb
Thank you for your Reply.
I checked the setting details, and I retried.
(I checked that the target serial baud-rate is 115200.)
Then I got the follwing result. But the target program does'nt execute.
I'm sorry, but could you tell me what causes like this result ?
...
(gdb) set remotebaud 115200
(gdb) set debug remote 1
(gdb) set debug serial 1
(gdb) target remote /dev/ttyUSB0
Remote debugging using /dev/ttyUSB0
Sending packet: $qSupported#37...[
r <Timeout: 2 seconds>]Sending packet: $qSupported#37...[q]putpkt: Junk: q[S]S[u]u[p]p[p]p[o]o[r]r[t]t[e]e[d]d[#]#[3]3[7]7[<Timeout: 2 seconds>]
Sending packet: $qSupported#37...[$]Packet instead of Ack, ignoring it
[q][S][u][p][p][o][r][t][e][d][#][3][7][+]Ack
[<Timeout: 2 seconds>]Timed out.
[-][<Timeout: 2 seconds>]Timed out.
[-][<Timeout: 2 seconds>]Timed out.
Ignoring packet error, continuing...
Packet qSupported (supported-packets) is supported
warning: unrecognized item "timeout" in "qSupported" response
Sending packet: $Hc-1#09...[-]Nak
Sending packet: $Hc-1#09...[+]Ack
[+][$][H][c][-][1][#][0][9]Packet received: Hc-1
Sending packet: $qC#b4...[$]Packet instead of Ack, ignoring it
[H][c][-][1][#][0][9][+]Ack
[$][q][C][#][b][4]Packet received: qC
Sending packet: $qOffsets#4b...[+]Ack
[+][$][q][O][f][f][s][e][t][s][#][4][b]Packet received: qOffsets
Malformed response to offset query, qOffsets
(gdb)
Thank you,
Yoriko Komatsuzaki
> On Fri, Nov 02, 2007 at 01:11:47PM +0900, Yoriko Komatsuzaki wrote:
> >
> > Thank you for your answer.
> >
> > My environment is a littel special.
> >
> > On target (gdbserver run), the serial (/dev/ttyS0) is used as the
> > channel. But on host (gdb run), the usb (/dev/ttyUSB0) is used.
> > And the host and the target is connected by "the serial/usb
> > transimission cable".
> >
> > So I guess that this special hardware environment might affects this
> > problem.
> >
> > % gdb
> > (gdb) set debug remote 1
> > (gdb) set debug serial 1
> > (gdb) target remote /dev/ttyUSB0
> > Remote debugging using /dev/ttyUSB0
> > Sending packet: $qSupported#37...
>
> This looks like either a baud rate problem, or some other complete
> failure of serial support on your host. GDB can't read even a single
> byte from your target.
>
> --
> Daniel Jacobowitz
> CodeSourcery
---
Yoriko Komatsuzaki (yoriko@sm.sony.co.jp)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gdbserver using serial port
2007-11-05 9:53 ` Yoriko Komatsuzaki
@ 2007-11-05 13:22 ` Daniel Jacobowitz
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-11-05 13:22 UTC (permalink / raw)
To: Yoriko Komatsuzaki; +Cc: gdb
On Mon, Nov 05, 2007 at 06:53:23PM +0900, Yoriko Komatsuzaki wrote:
> (gdb) target remote /dev/ttyUSB0
> Remote debugging using /dev/ttyUSB0
> Sending packet: $qSupported#37...[
> r <Timeout: 2 seconds>]Sending packet: $qSupported#37...[q]putpkt: Junk: q[S]S[u]u[p]p[p]p[o]o[r]r[t]t[e]e[d]d[#]#[3]3[7]7[<Timeout: 2 seconds>]
Your serial port appears to be echoing what GDB sent. Maybe the port
setup is wrong.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-11-05 13:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-02 2:14 gdbserver using serial port Yoriko Komatsuzaki
2007-11-02 2:25 ` Daniel Jacobowitz
2007-11-02 4:12 ` Yoriko Komatsuzaki
2007-11-02 11:31 ` Daniel Jacobowitz
2007-11-05 9:53 ` Yoriko Komatsuzaki
2007-11-05 13:22 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox