The microkernel architecture of QNX Neutrino systems means that debugging these systems can be different from debugging other embedded systems.
Many embedded systems require that you use a hardware debugger to troubleshoot problems. A hardware debugger is a physical device that uses a JTAG (Joint Test Action Group) interface to connect to the target hardware.
The hardware debugger is needed to troubleshoot drivers (and in some cases, user applications) on embedded systems systems, because on these systems the drivers and user applications are linked into the same memory space as the OS kernel. If a driver or application crashes, it may crash the kernel as well, bringing down the entire system.
Because software debuggers depend on the system running, they are of little use when the OS kernel has crashed. Thus, a hardware debugger is required when the system is not running.
The QNX Neutrino microkernel architecture makes it easier to use a software debugger for most of your troubleshooting, but it also imposes some limitations on the use of hardware debuggers:
For QNX Neutrino, you typically use:
In other words, you rarely have to use a JTAG hardware debugger, especially if you're using a QNX BSP (see the chapter Working with QNX BSPs).
QNX provides a software debugging agent called pdebug that makes it easier for you to debug system drivers and user applications. This agent runs on the target system and communicates with the host debugger over a serial or Ethernet connection.
For more information, see The process-level debug agent in the Compiling and Debugging chapter of the QNX Neutrino Programmer's Guide.
To use the pdebug software agent, the OS kernel must be running, so you need a hardware debugger to troubleshoot the IPL and the startup code. These run with the CPU in physical mode, so you can use conventional hardware debuggers, such as a JTAG debugger to troubleshoot them.
You can also use a hardware debugger to debug applications:
When you use a hardware debugger to debug QNX Neutrino IPLs and startup programs and do not provide any extra information, you're limited to assembly-level debugging, and assembler symbols such as subroutine names aren't visible
To perform full source-level debugging, provide the hardware debugger with the symbol information and the C source code.
This section describes how to generate the symbol and debug information required by a hardware debugger for source-level debugging. The examples assume that you're logged in on the development host with root privileges.