* Remote target behind console server
@ 2002-06-27 18:12 KONG, Gangfeng
2002-06-28 15:49 ` Andrew Cagney
0 siblings, 1 reply; 18+ messages in thread
From: KONG, Gangfeng @ 2002-06-27 18:12 UTC (permalink / raw)
To: gdb
Hi,
I have a target sitting behind a console server. I can use any box to
telnet to the console server and access the console port of my target. This
target
runs Linux kgdb stub on it. I have tested with serial cable, for my gdb host to
debug the kgdb target, everything is perfect. But in our situation, we must
debug
our target remotely through console server.
The question is whether it's feasible for gdb to remote debug this target
through
console server, which is a telnet / serial converter?
Thanks
GF
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-06-27 18:12 Remote target behind console server KONG, Gangfeng
@ 2002-06-28 15:49 ` Andrew Cagney
2002-06-28 17:51 ` Quality Quorum
[not found] ` <Pine.SGI.4.40.0206282044520.3477647-100000@shell01.TheWorl d.com>
0 siblings, 2 replies; 18+ messages in thread
From: Andrew Cagney @ 2002-06-28 15:49 UTC (permalink / raw)
To: KONG, Gangfeng; +Cc: gdb
> Hi,
>
> I have a target sitting behind a console server. I can use any box to
> telnet to the console server and access the console port of my target. This target
> runs Linux kgdb stub on it. I have tested with serial cable, for my gdb host to
> debug the kgdb target, everything is perfect. But in our situation, we must debug
> our target remotely through console server.
>
> The question is whether it's feasible for gdb to remote debug this target through
> console server, which is a telnet / serial converter?
You mean an ``annex[tm]''? Yes. You'll likely need to tweak things so
that the terminal server automatically connects the GDB session through
to the serial port. There isn't an easy way, from GDB, to send terminal
server commands.
enjoy,
Andrew
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-06-28 15:49 ` Andrew Cagney
@ 2002-06-28 17:51 ` Quality Quorum
[not found] ` <Pine.SGI.4.40.0206282044520.3477647-100000@shell01.TheWorl d.com>
1 sibling, 0 replies; 18+ messages in thread
From: Quality Quorum @ 2002-06-28 17:51 UTC (permalink / raw)
To: Andrew Cagney; +Cc: KONG, Gangfeng, gdb
On Fri, 28 Jun 2002, Andrew Cagney wrote:
> > Hi,
> >
> > I have a target sitting behind a console server. I can use any box to
> > telnet to the console server and access the console port of my target. This target
> > runs Linux kgdb stub on it. I have tested with serial cable, for my gdb host to
> > debug the kgdb target, everything is perfect. But in our situation, we must debug
> > our target remotely through console server.
> >
> > The question is whether it's feasible for gdb to remote debug this target through
> > console server, which is a telnet / serial converter?
>
> You mean an ``annex[tm]''? Yes. You'll likely need to tweak things so
> that the terminal server automatically connects the GDB session through
> to the serial port. There isn't an easy way, from GDB, to send terminal
> server commands.
You have to configure your terminal server appropriately (either enable
'raw' mode on the terminal server or disable 'X' command on the stub/gdb)
and this is basically it, people do it all the time.
If you are going to do 'load' over this connection big terminal server
buffers may screw it up.
>
> enjoy,
> Andrew
>
>
Thanks,
Aleksey
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
[not found] ` <Pine.SGI.4.40.0206282044520.3477647-100000@shell01.TheWorl d.com>
@ 2002-06-28 18:45 ` KONG, Gangfeng
2002-06-28 21:29 ` Daniel Jacobowitz
2002-06-29 7:45 ` Quality Quorum
0 siblings, 2 replies; 18+ messages in thread
From: KONG, Gangfeng @ 2002-06-28 18:45 UTC (permalink / raw)
To: Quality Quorum, Andrew Cagney; +Cc: gdb
>
> >
> > You mean an ``annex[tm]''? Yes. You'll likely need to tweak things so
> > that the terminal server automatically connects the GDB session through
> > to the serial port. There isn't an easy way, from GDB, to send terminal
> > server commands.
>
>You have to configure your terminal server appropriately (either enable
>'raw' mode on the terminal server or disable 'X' command on the stub/gdb)
>and this is basically it, people do it all the time.
>
>If you are going to do 'load' over this connection big terminal server
>buffers may screw it up.
Thanks for your message,
Basically I need to use 'telnet' to the ip-addr of my terminal server to access
the serial port of my target box. I may reconfigure the terminal server, but
how can I let gdb to setup an telnet connection to the terminal server and
then take this connection as media for its serial access to the stub on
the target?
Thanks
GF.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-06-28 18:45 ` KONG, Gangfeng
@ 2002-06-28 21:29 ` Daniel Jacobowitz
2002-07-02 20:05 ` KONG, Gangfeng
2002-06-29 7:45 ` Quality Quorum
1 sibling, 1 reply; 18+ messages in thread
From: Daniel Jacobowitz @ 2002-06-28 21:29 UTC (permalink / raw)
To: KONG, Gangfeng; +Cc: Quality Quorum, Andrew Cagney, gdb
On Fri, Jun 28, 2002 at 06:45:17PM -0700, KONG, Gangfeng wrote:
>
> >
> >>
> >> You mean an ``annex[tm]''? Yes. You'll likely need to tweak things so
> >> that the terminal server automatically connects the GDB session through
> >> to the serial port. There isn't an easy way, from GDB, to send terminal
> >> server commands.
> >
> >You have to configure your terminal server appropriately (either enable
> >'raw' mode on the terminal server or disable 'X' command on the stub/gdb)
> >and this is basically it, people do it all the time.
> >
> >If you are going to do 'load' over this connection big terminal server
> >buffers may screw it up.
> Thanks for your message,
>
> Basically I need to use 'telnet' to the ip-addr of my terminal server to
> access
> the serial port of my target box. I may reconfigure the terminal server, but
> how can I let gdb to setup an telnet connection to the terminal server and
> then take this connection as media for its serial access to the stub on
> the target?
Have you tried using 'target remote ip-addr:port' to the terminal
server directly?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-06-28 18:45 ` KONG, Gangfeng
2002-06-28 21:29 ` Daniel Jacobowitz
@ 2002-06-29 7:45 ` Quality Quorum
1 sibling, 0 replies; 18+ messages in thread
From: Quality Quorum @ 2002-06-29 7:45 UTC (permalink / raw)
To: KONG, Gangfeng; +Cc: Andrew Cagney, gdb
On Fri, 28 Jun 2002, KONG, Gangfeng wrote:
>
> >
> > >
> > > You mean an ``annex[tm]''? Yes. You'll likely need to tweak things so
> > > that the terminal server automatically connects the GDB session through
> > > to the serial port. There isn't an easy way, from GDB, to send terminal
> > > server commands.
> >
> >You have to configure your terminal server appropriately (either enable
> >'raw' mode on the terminal server or disable 'X' command on the stub/gdb)
> >and this is basically it, people do it all the time.
> >
> >If you are going to do 'load' over this connection big terminal server
> >buffers may screw it up.
> Thanks for your message,
>
> Basically I need to use 'telnet' to the ip-addr of my terminal server to access
> the serial port of my target box. I may reconfigure the terminal server, but
> how can I let gdb to setup an telnet connection to the terminal server and
> then take this connection as media for its serial access to the stub on
> the target?
target remote host:port
I do not have gdb on the system I am typing, but I hope the syntax is
correct
>
> Thanks
> GF.
>
Thanks,
Aleksey
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-06-28 21:29 ` Daniel Jacobowitz
@ 2002-07-02 20:05 ` KONG, Gangfeng
2002-07-02 21:40 ` Quality Quorum
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: KONG, Gangfeng @ 2002-07-02 20:05 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Quality Quorum, Andrew Cagney, gdb
At 12:28 AM 6/29/2002 -0400, Daniel Jacobowitz wrote:
>On Fri, Jun 28, 2002 at 06:45:17PM -0700, KONG, Gangfeng wrote:
> >
> > >
> > >>
> > >> You mean an ``annex[tm]''? Yes. You'll likely need to tweak things so
> > >> that the terminal server automatically connects the GDB session through
> > >> to the serial port. There isn't an easy way, from GDB, to send terminal
> > >> server commands.
> > >
> > >You have to configure your terminal server appropriately (either enable
> > >'raw' mode on the terminal server or disable 'X' command on the stub/gdb)
> > >and this is basically it, people do it all the time.
> > >
> > >If you are going to do 'load' over this connection big terminal server
> > >buffers may screw it up.
> > Thanks for your message,
> >
> > Basically I need to use 'telnet' to the ip-addr of my terminal server to
> > access
> > the serial port of my target box. I may reconfigure the terminal
> server, but
> > how can I let gdb to setup an telnet connection to the terminal server and
> > then take this connection as media for its serial access to the stub on
> > the target?
>
>Have you tried using 'target remote ip-addr:port' to the terminal
>server directly?
Hi,
I start the gdb stub on the target by:
gdbstart -s 38400 -t /dev/ttyS0
and start the gdb on the development box by:
gdb vmlinux
gdb)
gdb) set remotebaud 38400
gdb) target remote my-server-ipaddr:port #note, the port I put
here is the serial port# on the server,
#not L4 port, correct?
Now I only get error message:
ignoring packet error, continuing....
If I replace the console server by a direct serial cable for the above 2
boxes,
and use 'target remote /dev/ttyS0' instead. Everything works fine. So I know
except the serial connection, the rest configs are correct.
Could anybody correct me where I did wrongly ?
Thanks
GF
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-07-02 20:05 ` KONG, Gangfeng
@ 2002-07-02 21:40 ` Quality Quorum
2002-07-03 8:40 ` Andrew Cagney
[not found] ` <Pine.SGI.4.40.0207030038590.3981310-100000@shell01.TheWorl d.com>
2 siblings, 0 replies; 18+ messages in thread
From: Quality Quorum @ 2002-07-02 21:40 UTC (permalink / raw)
To: KONG, Gangfeng; +Cc: Daniel Jacobowitz, Andrew Cagney, gdb
On Tue, 2 Jul 2002, KONG, Gangfeng wrote:
> At 12:28 AM 6/29/2002 -0400, Daniel Jacobowitz wrote:
> >On Fri, Jun 28, 2002 at 06:45:17PM -0700, KONG, Gangfeng wrote:
> > >
> > > >
> > > >>
> > > >> You mean an ``annex[tm]''? Yes. You'll likely need to tweak things so
> > > >> that the terminal server automatically connects the GDB session through
> > > >> to the serial port. There isn't an easy way, from GDB, to send terminal
> > > >> server commands.
> > > >
> > > >You have to configure your terminal server appropriately (either enable
> > > >'raw' mode on the terminal server or disable 'X' command on the stub/gdb)
> > > >and this is basically it, people do it all the time.
> > > >
> > > >If you are going to do 'load' over this connection big terminal server
> > > >buffers may screw it up.
> > > Thanks for your message,
> > >
> > > Basically I need to use 'telnet' to the ip-addr of my terminal server to
> > > access
> > > the serial port of my target box. I may reconfigure the terminal
> > server, but
> > > how can I let gdb to setup an telnet connection to the terminal server and
> > > then take this connection as media for its serial access to the stub on
> > > the target?
> >
> >Have you tried using 'target remote ip-addr:port' to the terminal
> >server directly?
>
>
> Hi,
>
> I start the gdb stub on the target by:
> gdbstart -s 38400 -t /dev/ttyS0
> and start the gdb on the development box by:
> gdb vmlinux
> gdb)
> gdb) set remotebaud 38400
> gdb) target remote my-server-ipaddr:port #note, the port I put
> here is the serial port# on the server,
> #not L4 port, correct?
No, you have to use telnet port here.
> Now I only get error message:
> ignoring packet error, continuing....
>
> If I replace the console server by a direct serial cable for the above 2
> boxes,
> and use 'target remote /dev/ttyS0' instead. Everything works fine. So I know
> except the serial connection, the rest configs are correct.
>
> Could anybody correct me where I did wrongly ?
>
> Thanks
> GF
>
>
Thanks,
Aleksey
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-07-02 20:05 ` KONG, Gangfeng
2002-07-02 21:40 ` Quality Quorum
@ 2002-07-03 8:40 ` Andrew Cagney
2002-07-03 18:22 ` KONG, Gangfeng
[not found] ` <Pine.SGI.4.40.0207030038590.3981310-100000@shell01.TheWorl d.com>
2 siblings, 1 reply; 18+ messages in thread
From: Andrew Cagney @ 2002-07-03 8:40 UTC (permalink / raw)
To: KONG, Gangfeng; +Cc: Daniel Jacobowitz, Quality Quorum, gdb
> I start the gdb stub on the target by:
> gdbstart -s 38400 -t /dev/ttyS0
> and start the gdb on the development box by:
> gdb vmlinux
> gdb)
> gdb) set remotebaud 38400
Just BTW, since it is TCP, setting the remote baud won't have any effect.
Suggest adding a:
(gdb) set debug remote 1
here. It will cause GDB to print all remote traffic and that will
hopefully make it easier to see why things are going wrong. You should
be able to compare it to a working direct connection.
> gdb) target remote my-server-ipaddr:port #note, the port I put here is the serial port# on the server,
>
enjoy,
Andrew
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-07-03 8:40 ` Andrew Cagney
@ 2002-07-03 18:22 ` KONG, Gangfeng
0 siblings, 0 replies; 18+ messages in thread
From: KONG, Gangfeng @ 2002-07-03 18:22 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Daniel Jacobowitz, Quality Quorum, gdb
At 11:40 AM 7/3/2002 -0400, Andrew Cagney wrote:
>>I start the gdb stub on the target by:
>> gdbstart -s 38400 -t /dev/ttyS0
>>and start the gdb on the development box by:
>> gdb vmlinux
>> gdb)
>> gdb) set remotebaud 38400
>
>Just BTW, since it is TCP, setting the remote baud won't have any effect.
>
>Suggest adding a:
>
>(gdb) set debug remote 1
>
>here. It will cause GDB to print all remote traffic and that will
>hopefully make it easier to see why things are going wrong. You should be
>able to compare it to a working direct connection.
Hi,
I attached the output from my development box after I 'set debug remote 1'.
It looks like it didn't get reponse from target box. I have no idea......
--------------------------------------------------
(gdb) set debug remote 1
(gdb) target remote 4.22.79.12:2001
Remote debugging using 4.22.79.12:2001
Sending packet: $Hc-1#09...putpkt: Junk: {{}?s!t
Packet instead of Ack, ignoring it
Timeout in mid-packet, retrying
Sending packet: $Hc-1#09...putpkt: Junk: s!u
H 1!st
|
Sending packet: $Hc-1#09...putpkt: Junk: s!u
H 1!st
|
Sending packet: $Hc-1#09...putpkt: Junk: s!u
H 1!su
x
Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qC#b4...putpkt: Junk: s!uD ss_}!u
H 1!st
Sending packet: $qC#b4...putpkt: Junk: s v1!ubs}
Sending packet: $qC#b4...putpkt: Junk: s!vYmubs}
Sending packet: $qC#b4...putpkt: Junk: s!ub 1!sv
Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qOffsets#4b...putpkt: Junk: s!u! ssW}!u
b 1!u
b 1!su
Sending packet: $qOffsets#4b...putpkt: Junk: s!ub 1!u
Sending packet: $qOffsets#4b...putpkt: Junk: s*vb 1!u
Sending packet: $qOffsets#4b...putpkt: Junk: s!ub 1!u
Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout
(gdb)
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
[not found] ` <Pine.SGI.4.40.0207030038590.3981310-100000@shell01.TheWorl d.com>
@ 2002-07-03 18:26 ` KONG, Gangfeng
2002-07-03 21:33 ` Quality Quorum
[not found] ` <Pine.SGI.4.40.0207040021350.4215142-100000@shell01.TheWorl d.com>
0 siblings, 2 replies; 18+ messages in thread
From: KONG, Gangfeng @ 2002-07-03 18:26 UTC (permalink / raw)
To: Quality Quorum; +Cc: Daniel Jacobowitz, Andrew Cagney, gdb
> >
> > Hi,
> >
> > I start the gdb stub on the target by:
> > gdbstart -s 38400 -t /dev/ttyS0
> > and start the gdb on the development box by:
> > gdb vmlinux
> > gdb)
> > gdb) set remotebaud 38400
> > gdb) target remote my-server-ipaddr:port #note, the port I put
> > here is the serial port# on the server,
> > #not L4 port, correct?
>
>No, you have to use telnet port here.
Hi,
normally, I use the command:
telent server-ipaddr 2001
to access its port 1. (2002 for port 2, 2003 for port 3 ...)
It looks like console server already map its L4 port into serial port.
Thanks
GF
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-07-03 18:26 ` KONG, Gangfeng
@ 2002-07-03 21:33 ` Quality Quorum
2002-07-03 21:55 ` Eli Zaretskii
[not found] ` <Pine.SGI.4.40.0207040021350.4215142-100000@shell01.TheWorl d.com>
1 sibling, 1 reply; 18+ messages in thread
From: Quality Quorum @ 2002-07-03 21:33 UTC (permalink / raw)
To: KONG, Gangfeng; +Cc: Daniel Jacobowitz, Andrew Cagney, gdb
On Wed, 3 Jul 2002, KONG, Gangfeng wrote:
>
> > >
> > > Hi,
> > >
> > > I start the gdb stub on the target by:
> > > gdbstart -s 38400 -t /dev/ttyS0
> > > and start the gdb on the development box by:
> > > gdb vmlinux
> > > gdb)
> > > gdb) set remotebaud 38400
> > > gdb) target remote my-server-ipaddr:port #note, the port I put
> > > here is the serial port# on the server,
> > > #not L4 port, correct?
> >
> >No, you have to use telnet port here.
>
> Hi,
>
> normally, I use the command:
> telent server-ipaddr 2001
> to access its port 1. (2002 for port 2, 2003 for port 3 ...)
>
> It looks like console server already map its L4 port into serial port.
I suppose that L4 means port 4 on the server and /dev/ttyS0 on the target
then you have to use 'target server-ipaddr 2004'.
If L4 means something else, then use another port.
How to debug a connection:
1. Make sure that terminal server is properly configured and the
cable is good: connect port 4 on the terminal server to the some known
working target, e.g. standar UNIX serial port, do 'telnet server-ip
2004' and type stuff on console and check responses.
2. Make sure that gdb stub is workin properly: connect port 4 on the
terminal server to debug port on the targe, start gdb stub, again do
'telnet server-ip 2004' and make sure that by hitting return you
cause gdb to send you properly formed packets.
3. Start gdb and do 'target remote server-ip:2004' I would be very
surprised if it does not work at the point.
>
> Thanks
> GF
>
Thanks,
Aleksey
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-07-03 21:33 ` Quality Quorum
@ 2002-07-03 21:55 ` Eli Zaretskii
2002-07-08 9:49 ` Andrew Cagney
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2002-07-03 21:55 UTC (permalink / raw)
To: Quality Quorum; +Cc: KONG, Gangfeng, Daniel Jacobowitz, Andrew Cagney, gdb
On Thu, 4 Jul 2002, Quality Quorum wrote:
> On Wed, 3 Jul 2002, KONG, Gangfeng wrote:
>
> > > > I start the gdb stub on the target by:
> > > > gdbstart -s 38400 -t /dev/ttyS0
> > > > and start the gdb on the development box by:
> > > > gdb vmlinux
> > > > gdb)
> > > > gdb) set remotebaud 38400
> > > > gdb) target remote my-server-ipaddr:port #note, the port I put
> > > > here is the serial port# on the server,
> > > > #not L4 port, correct?
> > >
> > >No, you have to use telnet port here.
> >
> > Hi,
> >
> > normally, I use the command:
> > telent server-ipaddr 2001
> > to access its port 1. (2002 for port 2, 2003 for port 3 ...)
> >
> > It looks like console server already map its L4 port into serial port.
>
> I suppose that L4 means port 4 on the server and /dev/ttyS0 on the target
> then you have to use 'target server-ipaddr 2004'.
>
>
> If L4 means something else, then use another port.
>
>
> How to debug a connection:
>
> 1. Make sure that terminal server is properly configured and the
> cable is good: connect port 4 on the terminal server to the some known
> working target, e.g. standar UNIX serial port, do 'telnet server-ip
> 2004' and type stuff on console and check responses.
>
> 2. Make sure that gdb stub is workin properly: connect port 4 on the
> terminal server to debug port on the targe, start gdb stub, again do
> 'telnet server-ip 2004' and make sure that by hitting return you
> cause gdb to send you properly formed packets.
>
> 3. Start gdb and do 'target remote server-ip:2004' I would be very
> surprised if it does not work at the point.
Does anyone think that some of the above should be in the manual?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
[not found] ` <Pine.SGI.4.40.0207040021350.4215142-100000@shell01.TheWorl d.com>
@ 2002-07-04 15:01 ` KONG, Gangfeng
2002-07-04 22:21 ` Quality Quorum
[not found] ` <Pine.SGI.4.40.0207050115590.4236760-100000@shell01.TheWorl d.com>
0 siblings, 2 replies; 18+ messages in thread
From: KONG, Gangfeng @ 2002-07-04 15:01 UTC (permalink / raw)
To: Quality Quorum; +Cc: Daniel Jacobowitz, Andrew Cagney, gdb
At 12:33 AM 7/4/2002 -0400, Quality Quorum wrote:
>On Wed, 3 Jul 2002, KONG, Gangfeng wrote:
>
> >
> > > >
> > > > Hi,
> > > >
> > > > I start the gdb stub on the target by:
> > > > gdbstart -s 38400 -t /dev/ttyS0
> > > > and start the gdb on the development box by:
> > > > gdb vmlinux
> > > > gdb)
> > > > gdb) set remotebaud 38400
> > > > gdb) target remote my-server-ipaddr:port #note, the port
> I put
> > > > here is the serial port# on the server,
> > > > #not L4 port, correct?
> > >
> > >No, you have to use telnet port here.
> >
> > Hi,
> >
> > normally, I use the command:
> > telent server-ipaddr 2001
> > to access its port 1. (2002 for port 2, 2003 for port 3 ...)
> >
> > It looks like console server already map its L4 port into serial port.
>
>I suppose that L4 means port 4 on the server and /dev/ttyS0 on the target
>then you have to use 'target server-ipaddr 2004'.
In fact, L4 port, I mean Layer 4 (transport layer) port. Sorry for the
confusion.
I am very sure I was assigned at port 1. And I use 'telnet server-ipaddr 2001'
to access the target console normally.,
>If L4 means something else, then use another port.
>
>
>How to debug a connection:
>
>1. Make sure that terminal server is properly configured and the
> cable is good: connect port 4 on the terminal server to the some known
> working target, e.g. standar UNIX serial port, do 'telnet server-ip
> 2004' and type stuff on console and check responses.
>
>2. Make sure that gdb stub is workin properly: connect port 4 on the
> terminal server to debug port on the targe, start gdb stub, again do
> 'telnet server-ip 2004' and make sure that by hitting return you
> cause gdb to send you properly formed packets.
>
>3. Start gdb and do 'target remote server-ip:2004' I would be very
> surprised if it does not work at the point.
>
In order to check the whole system, I did install a kgdb stub of linux on my
laptop, so that I can move it around. What I have done are:
1. enable the /dev/ttyS0 in /etc/inittab, then I can login through serial port
the check whether it works. I connect it to the port 1 of my console
server,
then, I remotely login into it by 'telnet server-ipaddr 2001'. Works!
SO:
- target serial port works
- console server works
2. I move the laptop target close to my development box, and I use serial cable
to connect them directly. I start the stub on target by 'gdbstart -s
38400 -t
/dev/ttyS0'. And then start the gdb on the development box. Now I can use
gdb to debug my target box as expected.
SO:
- the stub on target is ok
- the gdb on the development box is ok
3. Now I move the laptop target back to the console server and connect the port
1 to its serial port and start the stub by 'gdbstart -s 38400 -t
/dev/ttyS0', and
go the development box to start the gdb and try to access the target
box by
'target remote server-ipaddr:2001'.
But it fails......
I don't know what's wrong.
Thanks
GF
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-07-04 15:01 ` KONG, Gangfeng
@ 2002-07-04 22:21 ` Quality Quorum
[not found] ` <Pine.SGI.4.40.0207050115590.4236760-100000@shell01.TheWorl d.com>
1 sibling, 0 replies; 18+ messages in thread
From: Quality Quorum @ 2002-07-04 22:21 UTC (permalink / raw)
To: KONG, Gangfeng; +Cc: Daniel Jacobowitz, Andrew Cagney, gdb
On Thu, 4 Jul 2002, KONG, Gangfeng wrote:
> At 12:33 AM 7/4/2002 -0400, Quality Quorum wrote:
>
>
> >On Wed, 3 Jul 2002, KONG, Gangfeng wrote:
> >
> > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > I start the gdb stub on the target by:
> > > > > gdbstart -s 38400 -t /dev/ttyS0
> > > > > and start the gdb on the development box by:
> > > > > gdb vmlinux
> > > > > gdb)
> > > > > gdb) set remotebaud 38400
> > > > > gdb) target remote my-server-ipaddr:port #note, the port
> > I put
> > > > > here is the serial port# on the server,
> > > > > #not L4 port, correct?
> > > >
> > > >No, you have to use telnet port here.
> > >
> > > Hi,
> > >
> > > normally, I use the command:
> > > telent server-ipaddr 2001
> > > to access its port 1. (2002 for port 2, 2003 for port 3 ...)
> > >
> > > It looks like console server already map its L4 port into serial port.
> >
> >I suppose that L4 means port 4 on the server and /dev/ttyS0 on the target
> >then you have to use 'target server-ipaddr 2004'.
>
> In fact, L4 port, I mean Layer 4 (transport layer) port. Sorry for the
> confusion.
> I am very sure I was assigned at port 1. And I use 'telnet server-ipaddr 2001'
> to access the target console normally.,
>
>
>
> >If L4 means something else, then use another port.
> >
> >
> >How to debug a connection:
> >
> >1. Make sure that terminal server is properly configured and the
> > cable is good: connect port 4 on the terminal server to the some known
> > working target, e.g. standar UNIX serial port, do 'telnet server-ip
> > 2004' and type stuff on console and check responses.
> >
> >2. Make sure that gdb stub is workin properly: connect port 4 on the
> > terminal server to debug port on the targe, start gdb stub, again do
> > 'telnet server-ip 2004' and make sure that by hitting return you
> > cause gdb to send you properly formed packets.
> >
> >3. Start gdb and do 'target remote server-ip:2004' I would be very
> > surprised if it does not work at the point.
> >
>
> In order to check the whole system, I did install a kgdb stub of linux on my
> laptop, so that I can move it around. What I have done are:
> 1. enable the /dev/ttyS0 in /etc/inittab, then I can login through serial port
> the check whether it works. I connect it to the port 1 of my console
> server,
> then, I remotely login into it by 'telnet server-ipaddr 2001'. Works!
> SO:
> - target serial port works
> - console server works
> 2. I move the laptop target close to my development box, and I use serial cable
> to connect them directly. I start the stub on target by 'gdbstart -s
> 38400 -t
> /dev/ttyS0'. And then start the gdb on the development box. Now I can use
> gdb to debug my target box as expected.
> SO:
> - the stub on target is ok
> - the gdb on the development box is ok
I suppose that you are using null-modem cable at the point.
> 3. Now I move the laptop target back to the console server and connect the port
> 1 to its serial port and start the stub by 'gdbstart -s 38400 -t
> /dev/ttyS0', and
> go the development box to start the gdb and try to access the target
> box by
> 'target remote server-ipaddr:2001'.
> But it fails......
>
> I don't know what's wrong.
I suppose port configuration or wrong cable or wrong baud rate, I
suppose you have to use stright cable here and in many cases authobaud
feature does not work with gdb stub.
Anyway, connect you rtarget to the terminal server, start gdb stub, do
'telnet serverip 2001' and try to figure out what is going wrong until
you see '$...#yy in response to pressing ENTER.
>
> Thanks
> GF
>
>
Thanks,
Aleksey
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
[not found] ` <Pine.SGI.4.40.0207050115590.4236760-100000@shell01.TheWorl d.com>
@ 2002-07-05 13:56 ` KONG, Gangfeng
2002-07-05 16:21 ` Quality Quorum
0 siblings, 1 reply; 18+ messages in thread
From: KONG, Gangfeng @ 2002-07-05 13:56 UTC (permalink / raw)
To: Quality Quorum; +Cc: Daniel Jacobowitz, Andrew Cagney, gdb
>
> >
> > In order to check the whole system, I did install a kgdb stub of linux
> on my
> > laptop, so that I can move it around. What I have done are:
> > 1. enable the /dev/ttyS0 in /etc/inittab, then I can login through
> serial port
> > the check whether it works. I connect it to the port 1 of my console
> > server,
> > then, I remotely login into it by 'telnet server-ipaddr 2001'. Works!
> > SO:
> > - target serial port works
> > - console server works
> > 2. I move the laptop target close to my development box, and I use
> serial cable
> > to connect them directly. I start the stub on target by 'gdbstart -s
> > 38400 -t
> > /dev/ttyS0'. And then start the gdb on the development box. Now I
> can use
> > gdb to debug my target box as expected.
> > SO:
> > - the stub on target is ok
> > - the gdb on the development box is ok
>
>
>I suppose that you are using null-modem cable at the point.
Yes.
> > 3. Now I move the laptop target back to the console server and connect
> the port
> > 1 to its serial port and start the stub by 'gdbstart -s 38400 -t
> > /dev/ttyS0', and
> > go the development box to start the gdb and try to access the target
> > box by
> > 'target remote server-ipaddr:2001'.
> > But it fails......
> >
> > I don't know what's wrong.
>
>I suppose port configuration or wrong cable or wrong baud rate, I
>suppose you have to use stright cable here and in many cases authobaud
>feature does not work with gdb stub.
>
>Anyway, connect you rtarget to the terminal server, start gdb stub, do
>'telnet serverip 2001' and try to figure out what is going wrong until
>you see '$...#yy in response to pressing ENTER.
Hi,
You are definitely right. The baudrate is wrong, the console server seems not
to be able to auto-configure the baudrate of its ports. I use your suggestion
'telnet serverip 2001' to talk to every possible baudrate of the target from
9600 to 115200. I can not get '$...#yy' reply in any baudrate. But 9600 set
did give
a me persistent reply '$s05#b8', all of the other baudrate set gave me a series
of changing replies. Late I tried 'target remote serverip:2001' with a 9600
baudrate
stub. I works!
Thank you very much for your help, I understand it better now!
GF
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-07-05 13:56 ` KONG, Gangfeng
@ 2002-07-05 16:21 ` Quality Quorum
0 siblings, 0 replies; 18+ messages in thread
From: Quality Quorum @ 2002-07-05 16:21 UTC (permalink / raw)
To: KONG, Gangfeng; +Cc: Daniel Jacobowitz, Andrew Cagney, gdb
>
> You are definitely right. The baudrate is wrong, the console server seems not
> to be able to auto-configure the baudrate of its ports. I use your suggestion
> 'telnet serverip 2001' to talk to every possible baudrate of the target from
> 9600 to 115200. I can not get '$...#yy' reply in any baudrate. But 9600 set
> did give
> a me persistent reply '$s05#b8', all of the other baudrate set gave me a series
> of changing replies. Late I tried 'target remote serverip:2001' with a 9600
> baudrate
> stub. I works!
>
> Thank you very much for your help, I understand it better now!
> GF
>
>
You are welcome, it may be a good idea to reconfigure the port on the
server and disable autobaud.
Thanks,
Aleksey
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Remote target behind console server
2002-07-03 21:55 ` Eli Zaretskii
@ 2002-07-08 9:49 ` Andrew Cagney
0 siblings, 0 replies; 18+ messages in thread
From: Andrew Cagney @ 2002-07-08 9:49 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Quality Quorum, KONG, Gangfeng, Daniel Jacobowitz, gdb
> If L4 means something else, then use another port.
>>
>>
>> How to debug a connection:
>>
>> 1. Make sure that terminal server is properly configured and the
>> cable is good: connect port 4 on the terminal server to the some known
>> working target, e.g. standar UNIX serial port, do 'telnet server-ip
>> 2004' and type stuff on console and check responses.
>>
>> 2. Make sure that gdb stub is workin properly: connect port 4 on the
>> terminal server to debug port on the targe, start gdb stub, again do
>> 'telnet server-ip 2004' and make sure that by hitting return you
>> cause gdb to send you properly formed packets.
>>
>> 3. Start gdb and do 'target remote server-ip:2004' I would be very
>> surprised if it does not work at the point.
>
>
> Does anyone think that some of the above should be in the manual?
Yes!
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2002-07-08 16:49 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-27 18:12 Remote target behind console server KONG, Gangfeng
2002-06-28 15:49 ` Andrew Cagney
2002-06-28 17:51 ` Quality Quorum
[not found] ` <Pine.SGI.4.40.0206282044520.3477647-100000@shell01.TheWorl d.com>
2002-06-28 18:45 ` KONG, Gangfeng
2002-06-28 21:29 ` Daniel Jacobowitz
2002-07-02 20:05 ` KONG, Gangfeng
2002-07-02 21:40 ` Quality Quorum
2002-07-03 8:40 ` Andrew Cagney
2002-07-03 18:22 ` KONG, Gangfeng
[not found] ` <Pine.SGI.4.40.0207030038590.3981310-100000@shell01.TheWorl d.com>
2002-07-03 18:26 ` KONG, Gangfeng
2002-07-03 21:33 ` Quality Quorum
2002-07-03 21:55 ` Eli Zaretskii
2002-07-08 9:49 ` Andrew Cagney
[not found] ` <Pine.SGI.4.40.0207040021350.4215142-100000@shell01.TheWorl d.com>
2002-07-04 15:01 ` KONG, Gangfeng
2002-07-04 22:21 ` Quality Quorum
[not found] ` <Pine.SGI.4.40.0207050115590.4236760-100000@shell01.TheWorl d.com>
2002-07-05 13:56 ` KONG, Gangfeng
2002-07-05 16:21 ` Quality Quorum
2002-06-29 7:45 ` Quality Quorum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox