02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>Tornado</strong> 2.0<br />

User’s Guide<br />

5.2.6 Using the Shell for System Mode Debugging<br />

The bulk of this chapter discusses the shell in its most frequent style of use:<br />

attached to a normally running VxWorks system, through a target agent running<br />

in task mode. You can also use the shell with a system-mode agent. Entering<br />

system mode stops the entire target system: all tasks, the kernel, and all ISRs.<br />

Similarly, breakpoints affect all tasks. One major shell feature is not available in<br />

system mode: you cannot execute expressions that call target-resident routines.<br />

You can still spawn tasks, but bear in mind that, because the entire system is<br />

stopped, a newly-spawned task can only execute when you allow the kernel to run<br />

long enough to schedule that task.<br />

Depending on how the target agent is configured, you may be able to switch<br />

between system mode and task mode; see 4.6 Configuring the Target-Host<br />

Communication Interface, p.137. When the agent supports mode switching, the<br />

following WindSh commands control system mode:<br />

sysSuspend( )<br />

Enter system mode and stop the target system.<br />

sysResume( )<br />

Return to task mode and resume execution of the target system.<br />

The following commands are to determine the state of the system and the agent:<br />

agentModeShow( )<br />

Show the agent mode (system or task).<br />

sysStatusShow( )<br />

Show the system context status (suspended or running).<br />

The following shell commands behave differently in system mode:<br />

b( )<br />

Set a system-wide breakpoint; the system stops when this breakpoint is<br />

encountered by any task, or the kernel, or an ISR.<br />

c( )<br />

Resume execution of the entire system (but remain in system mode).<br />

i( )<br />

Display the state of the system context and the mode of the agent.<br />

s( )<br />

Single-step the entire system.<br />

170

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

Saved successfully!

Ooh no, something went wrong!