remote debugging

I’m trying to debug application working with local resources ( /dev/xxx )
from remote node ( watcom is installed on node 1 and application is running
on node 2 ). When my application is running ( on node 2 ) I could debug it
with command: "wd //2 ". And here is my problem: I would like to start
program from node1 with debugger ( I want to debug initialization functions
for example ). When I type command: “wd //2 //2/…/my_app” from node1 (
watcom is installed there ), application is working with local resources (
equivalent of “on -n2 my_app” ). But application needs to run resources
located on node 2 and fails to start. Is there any equivalent of “on -f2
my_app” for debugging?

It’s possible to solve my problem with code modification:

  • specify full path of resources ( //2/dev/xxx )
  • or insert "kill( getpid(), SIGSTOP ) at beginning of my code and debug
    running application remotely.

Neither of these solutions like me :frowning: and both really restrict me.

Can anybody help me? Do anybody know any “switch” or “option” which I don’t
know?

Martin Michalek <michalek@procaut.sk> wrote:

I’m trying to debug application working with local resources ( /dev/xxx )
from remote node ( watcom is installed on node 1 and application is running
on node 2 ). When my application is running ( on node 2 ) I could debug it
with command: "wd //2 ". And here is my problem: I would like to start
program from node1 with debugger ( I want to debug initialization functions
for example ). When I type command: “wd //2 //2/…/my_app” from node1 (
watcom is installed there ), application is working with local resources (
equivalent of “on -n2 my_app” ). But application needs to run resources
located on node 2 and fails to start. Is there any equivalent of “on -f2
my_app” for debugging?

It’s possible to solve my problem with code modification:

  • specify full path of resources ( //2/dev/xxx )
  • or insert "kill( getpid(), SIGSTOP ) at beginning of my code and debug
    running application remotely.

How about:

on -f 2 -h myapp

wd //2 pid

The -h to on says to “spawn held”, that is, it is loaded and immediately
held. Then, you can attach to it before it does anything, allowing you to
debug your startup functions, etc.

-David

David Gibbs
dagibbs@qnx.com

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:c2is5l$eor$1@inn.qnx.com

Martin Michalek <> michalek@procaut.sk> > wrote:
I’m trying to debug application working with local resources (
/dev/xxx )
from remote node ( watcom is installed on node 1 and application is
running
on node 2 ). When my application is running ( on node 2 ) I could debug
it
with command: "wd //2 ". And here is my problem: I would like to
start
program from node1 with debugger ( I want to debug initialization
functions
for example ). When I type command: “wd //2 //2/…/my_app” from node1 (
watcom is installed there ), application is working with local resources
(
equivalent of “on -n2 my_app” ). But application needs to run resources
located on node 2 and fails to start. Is there any equivalent of “on -f2
my_app” for debugging?

It’s possible to solve my problem with code modification:

  • specify full path of resources ( //2/dev/xxx )
  • or insert "kill( getpid(), SIGSTOP ) at beginning of my code and debug
    running application remotely.

How about:

on -f 2 -h myapp

wd //2 pid

The -h to on says to “spawn held”, that is, it is loaded and immediately
held. Then, you can attach to it before it does anything, allowing you to
debug your startup functions, etc.

-David

This is what I was looking for. Thanks