VxWorks Reference Manual : Libraries
wdbLib - WDB agent context management library
wdbSystemSuspend( ) - suspend the system.
This library provides a routine to transfer control from the run time system to the WDB agent running in external mode. This agent in external mode allows a system-wide control, including ISR debugging, from a host tool (eg: Crosswind, WindSh ...) through the target server and the WDB communcation link.
wdb/wdbLib.h
wdbLib, API Guide: WTX Protocol , Tornado User's Guide: Overview
wdbSystemSuspend( ) - suspend the system.
STATUS wdbSystemSuspend (void)
This routine transfers control from the run time system to the WDB agent running in external mode. In order to give back the control to the system it must be resumed by the the external WDB agent.
The code below, called in a vxWorks application, suspends the system :
if (wdbSystemSuspend != OK) printf ("External mode is not supported by the WDB agent.\n");From a host tool, we can detect that the system is suspended.First, attach to the target server :
wtxtcl> wtxToolAttach EP960CX EP960CX_ps@sevreThen, you can get the agent mode :
wtxtcl> wtxAgentModeGet AGENT_MODE_EXTERNTo get the status of the system context, execute :
wtxtcl> wtxContextStatusGet CONTEXT_SYSTEM 0 CONTEXT_SUSPENDEDIn order to resume the system, simply execute :
wtxtcl> wtxContextResume CONTEXT_SYSTEM 0 0You will see that the system is now running :
wtxtcl> wtxContextStatusGet CONTEXT_SYSTEM 0 CONTEXT_RUNNING
OK upon successful completion, ERROR if external mode is not supported by the WDB agent.