05.06.2014 Views

QNX Neutrino Programmer's Guide [6.5.0 SP1] - QNX Software ...

QNX Neutrino Programmer's Guide [6.5.0 SP1] - QNX Software ...

QNX Neutrino Programmer's Guide [6.5.0 SP1] - QNX Software ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

© 2012, <strong>QNX</strong> <strong>Software</strong> Systems Limited Debugging<br />

TCP/IP<br />

Port<br />

1234<br />

inetd<br />

Port<br />

1234<br />

Port<br />

1234<br />

pdebug pdebug pdebug<br />

For a TCP/IP dynamic port connection, the inetd process will manage the port.<br />

Note that this method is also suitable for one or more developers. It’s effectively what<br />

the qconn daemon does to provide support to remote IDE components; qconn listens<br />

to a port and spawns pdebug on a new, dynamically determined port.<br />

Sample buildfile for dynamic port sessions<br />

The following buildfile supports multiple sessions specifying the same port. Although<br />

the port for each session on the pdebug side is the same, inetd causes unique ports<br />

to be used on the debugger side. This ensures a unique socket pair for each session.<br />

Note that inetd should be included and started in your boot image. The pdebug<br />

program should also be in your boot image (or available from a mounted filesystem).<br />

The config files could be built into your boot image (as in this sample buildfile) or<br />

linked in from a remote filesystem using the [type=link] command:<br />

[type=link] /etc/services=/mount_point/services<br />

[type=link] /etc/inetd.conf=/mount_point/inetd.conf<br />

Here’s the buildfile:<br />

[virtual=x86,bios +compress] boot = {<br />

startup-bios -N node428<br />

PATH=/proc/boot:/bin:/apk/bin_nto:./ procnto<br />

}<br />

[+script] startup-script = {<br />

# explicitly running in edited mode for the console link<br />

devc-ser8250 -e -b115200 &<br />

reopen<br />

display_msg Welcome to <strong>Neutrino</strong> on a PC-compatible BIOS system<br />

# tcp/ip with a NE2000 Ethernet adaptor<br />

June 14, 2012 Chapter 1 • Compiling and Debugging 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!