Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Debugging a remote application and application's devices
Ref. No. QNX.000005908
Category(ies) Development
Issue Two nodes are full Photon "workstations" and a third node is an embedded "target" with 4Meg RAM and 4M RAM-Disk.

We have a simple program that opens /dev/ser1
    fd = open("/dev/ser1", O_RDWR)
The program runs fine on the workstation, and on the target when invoked directly.
However, when invoked from a shell on node 2 through the debugger as
    wd //3 testser
or equivalently
    cp testser* //3
    wd //3 //3/testser

wd launches testser on node 3 but the testser opens //2/dev/ser1 and not its own /dev/ser1.

Is this correct (QSSL-Expected) behavior and, if so, why?
Solution Yes, this is "correct" behaviour.  "wd //3 testser" runs testser in the equivalent mode to "on -n 3 testser", that is it runs on node 3, but with the namespace from the node it is run from (node 2), so /dev/ser1 gets resolved as //2/dev/ser2.

Work-arounds:

Change the code to open "//0/dev/ser" -- this will always get the local
serial port.

    > on -n 61 fullpath /dev
    /dev is //88/dev
    > on -n 61 fullpath //0/dev
    //0/dev is //61/dev

Start testser & wd differently:

  on -f 3 -h testser
  sin -n 3 -P testser
  wd //3 pid_of_testser

Then, in wd, put a break at the start of main() then, have it continue.