Watcom wd and tcpserv

Has anyone ever used tcpserv ?

In all my years in QNX, I have never used it (I have always done debugging
across the QNX network). I have a need to use it now, but I can’t get
tcpserv to even start (just complains that it can’t open stream socket).
TCP/IP is up, configured correctly and working (there are 3 interfaces). I
assume that tcpserv is going to try and attach to ports on each interface
(since there is no way to direct it to a particular interface near as I can
tell).

Any pointers are appreciated.

Rennie

John Doe <john@csical.com> wrote:

Has anyone ever used tcpserv ?

In all my years in QNX, I have never used it (I have always done debugging
across the QNX network). I have a need to use it now, but I can’t get
tcpserv to even start (just complains that it can’t open stream socket).
TCP/IP is up, configured correctly and working (there are 3 interfaces). I
assume that tcpserv is going to try and attach to ports on each interface
(since there is no way to direct it to a particular interface near as I can
tell).

Any pointers are appreciated.

Rennie

here’s a technote i have that has helped me in the past.
be sure to have the right trap file on the target:
e.g. you need /usr/watcom/wd/std.trp

Using WD over tcp

wd needs a license, so the machine running wd must be able to acquire
a Watcom license. The machine running tcpserv does not need a license.

In order to use TCP/IP to remotely debug a program, you must start the
TCPSERV server program first. For example,

A>tcpserv
Socket port number: 1024
WATCOM TCP/IP Debug Server
Version 10.6
Copyright by WATCOM International …
Press ‘q’ to exit

The server program displays an available socket port number on the
screen.

You also need to know your IP address. This can be
in alphanumeric or numeric form (for example,
jdoe.watcom.on.ca or 172.31.0.99).

To use the remote TCP/IP server, you must specify the TCP/IP trap
filename to the debugger along with an argument consisting of the
socket port number given by TCPSERV and your IP address. You must
also include the name of the application you wish to debug. For
example:

B>wd -tr=“tcp;1024.jdoe.watcom.on.ca” app
or
B>wd -tr=“tcp;1024.172.31.0.99” app

The TCP/IP remote debug service permits debugging of applications
anywhere on the Internet. However, response varies with the type of
connection involved.
The ‘app’ must be the path to the real binary being debugged. The protocol
will not automatically download the executable to the target.


\

Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

“Randy Martin” <randy@qnx.com> wrote in message
news:94k554$b7$1@nntp.qnx.com

here’s a technote i have that has helped me in the past.
be sure to have the right trap file on the target:
e.g. you need /usr/watcom/wd/std.trp

Thanks for the response Randy. Unfortunately, if I simply type “tcpserv” as
in your example (and the documentation) it simply prints out “could not
connect to stream socket” and exits.

I have put all the trap files on the target (I copied all of of
/usr/watcom/10.6/wd to the target, and then linked /usr/watcom/10.6/wd to
/usr/watcom/wd). I have a development license on the host (although this is
irrelevent at this point since I can’t get the server to start on the
target). I used a neutrino 0.xx version of tcpserv when I was at QNX and
watcom was still being used for neutrino development; but I have never used
it on a QNX4 target (so I am familiar with how to start the host side, but
not the target side).

I’ll double-check the trap files on the target for permissions etc; if you
have any other ideas what might be going on I am all ears.

Rennie

John Doe <john@csical.com> wrote:

i use the tcpserv from 10.6, dated
-rwxr-xr-x 1 root root 25766 Jul 03 1997 /usr/watcom/10.6/bin/tc
pserv


only other thing is to check tcp on the remote end? Socket is up okay
and all that?


“Randy Martin” <> randy@qnx.com> > wrote in message
news:94k554$b7$> 1@nntp.qnx.com> …

here’s a technote i have that has helped me in the past.
be sure to have the right trap file on the target:
e.g. you need /usr/watcom/wd/std.trp

Thanks for the response Randy. Unfortunately, if I simply type “tcpserv” as
in your example (and the documentation) it simply prints out “could not
connect to stream socket” and exits.

I have put all the trap files on the target (I copied all of of
/usr/watcom/10.6/wd to the target, and then linked /usr/watcom/10.6/wd to
/usr/watcom/wd). I have a development license on the host (although this is
irrelevent at this point since I can’t get the server to start on the
target). I used a neutrino 0.xx version of tcpserv when I was at QNX and
watcom was still being used for neutrino development; but I have never used
it on a QNX4 target (so I am familiar with how to start the host side, but
not the target side).

I’ll double-check the trap files on the target for permissions etc; if you
have any other ideas what might be going on I am all ears.

Rennie


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

“Randy Martin” <randy@qnx.com> wrote in message
news:94kevt$5ke$1@nntp.qnx.com

John Doe <> john@csical.com> > wrote:

i use the tcpserv from 10.6, dated
-rwxr-xr-x 1 root root 25766 Jul 03 1997
/usr/watcom/10.6/bin/tc
pserv

Hmmm, mine is also from 10.6 but the file size is 25474.

Would you happen to know where I could get your version (is there a patch I
am missing or one that I applied that I shouldn’t have ?)

only other thing is to check tcp on the remote end? Socket is up okay
and all that?

Yup, Socket is being used to do lot’s of other stuff, that all works.

Rennie

John Doe <john@csical.com> wrote:

my system is installed from the latest commercial release last year. no other
betas were applied.

send me email if you want to try mine…

“Randy Martin” <> randy@qnx.com> > wrote in message
news:94kevt$5ke$> 1@nntp.qnx.com> …
John Doe <> john@csical.com> > wrote:

i use the tcpserv from 10.6, dated
-rwxr-xr-x 1 root root 25766 Jul 03 1997
/usr/watcom/10.6/bin/tc
pserv

Hmmm, mine is also from 10.6 but the file size is 25474.

Would you happen to know where I could get your version (is there a patch I
am missing or one that I applied that I shouldn’t have ?)


only other thing is to check tcp on the remote end? Socket is up okay
and all that?

Yup, Socket is being used to do lot’s of other stuff, that all works.

Rennie


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

“Randy Martin” <randy@qnx.com> wrote in message
news:94kovu$auh$1@nntp.qnx.com

John Doe <> john@csical.com> > wrote:

my system is installed from the latest commercial release last year. no
other
betas were applied.

send me email if you want to try mine…

Randy,

I applied patches A and B, and now the file size is the same, and tcpserv
works as advertised. Having just started at this company I was not aware
that patches from 1999 had not been applied to our development system :frowning:

Anyway, I doubt I would have suspected that there was a newer version of
tcpserv, if you hadn’t posted the file dates, so you can “chalk one up” for
standard tech support procedures :slight_smile:

Thanks again.

Rennie