The WDB agent carries out requests transmitted from the target server, and replies with the results. The WDB agent contains a compact implementation of UDP/IP, which supports an RPC messaging protocol called WDB. The WDB protocol is a core minimum of the services necessary to respond to requests from the Tornado tools. These protocol requests include memory transactions, breakpoint/event notification services, virtual I/O support, and tasking control. The WDB protocol uses the Sun Microsystems specification for External Data Representation (XDR) for data transfer.
The WDB agent synthesizes the target-control strategies of task-level and system-wide debugging. The agent can execute in either mode and switch dynamically between them, provided the appropriate drivers are present in the Board Support Package (BSP). This permits debugging of any aspect of an embedded application whether it is a task, an interrupt service routine, or the kernel itself.
A significant feature provided by the WDB agent is its ability to interpret a simple language called Gopher (for a description of the Gopher language, see 4.3.11 Gopher Support). Gopher scripts are very compact strings that specify a target data structure (or a list of structures) of arbitrary complexity to be gathered and transferred to the host. Because this technique is interpretive, the target is not burdened with specialized routines to gather state information for every system object.
By virtue of a Gopher script, application developers can likewise gather application-object state information without burdening the application with state-information routines. The Gopher interpreter itself is very small (smaller than the amount of the memory that would otherwise be required by target routines to gather only the most essential system objects), and the language is compact to reduce communication overhead. The Gopher language is accessible at higher-level Tornado APIs.
The WDB agent's interface to communications drivers avoids the run-time I/O system, so that the WDB agent remains independent of the run-time OS. Drivers for the WDB agent are low-level drivers that provide both interrupt-driven and polling-mode operation. Polling mode is required to support system-level control of the target.
The WDB agent itself is independent of the target operating system: it attaches to run-time OS services through a virtual-function run-time interface. The WDB agent can execute before VxWorks is running (as in the early stages of porting a BSP to a new board) or even stand-alone.
Should your application require different function from that provided by the WDB agent, the target server can communicate with alternative agents by means of an alternative back end. For more information on non-WDB agents and back ends, see 2. Target Server Back End.