VxWorks Reference Manual : Libraries

wdbLib

NAME

wdbLib - WDB agent context management library

ROUTINES

wdbSystemSuspend( ) - suspend the system.

DESCRIPTION

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.

INCLUDE FILES

wdb/wdbLib.h

SEE ALSO

wdbLib, API Guide: WTX Protocol , Tornado User's Guide: Overview


Libraries : Routines

wdbSystemSuspend( )

NAME

wdbSystemSuspend( ) - suspend the system.

SYNOPSIS


STATUS wdbSystemSuspend (void)

DESCRIPTION

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.

EXAMPLE

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@sevre
Then, you can get the agent mode :

  wtxtcl> wtxAgentModeGet
  AGENT_MODE_EXTERN
To get the status of the system context, execute :

  wtxtcl> wtxContextStatusGet CONTEXT_SYSTEM 0
  CONTEXT_SUSPENDED
In order to resume the system, simply execute :

  wtxtcl>  wtxContextResume CONTEXT_SYSTEM 0
  0
You will see that the system is now running :

  wtxtcl> wtxContextStatusGet CONTEXT_SYSTEM 0
  CONTEXT_RUNNING

RETURNS

OK upon successful completion, ERROR if external mode is not supported by the WDB agent.

SEE ALSO

wdbLib