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.

5<br />

Shell<br />

tWdbTask 0x3f024 398e04 3 READY 405ac 398d50 30067 0<br />

tNetTask _netTask 3b39e0 50 PEND 405ac 3b3988 0 0<br />

value = 0 = 0x0<br />

If you want to debug an application you have loaded dynamically, set an<br />

appropriate breakpoint and spawn a task which runs when you continue the<br />

system:<br />

-> sysSuspend<br />

value = 0 = 0x0<br />

-> ld < test.o<br />

Loading /view/didier.temp/vobs/wpwr/target/lib/objMC68040gnutest//test.o /<br />

value = 400496 = 0x61c70 = _rn_addroute + 0x1d4<br />

-> b address<br />

value = 0 = 0x0<br />

-> sp test<br />

value = 0 = 0x0<br />

-> c<br />

5<br />

The application breaks on address when the instruction at address is executed.<br />

5.2.7 Interrupting a Shell Command<br />

Occasionally it is desirable to abort the shell’s evaluation of a statement. For<br />

example, an invoked routine may loop excessively, suspend, or wait on a<br />

semaphore. This may happen as the result of errors in arguments specified in the<br />

invocation, errors in the implementation of the routine itself, or simply oversight<br />

as to the consequences of calling the routine.<br />

To regain control of the shell in such cases, press the interrupt character on the<br />

keyboard, usually CTRL+C. 2 This makes the shell stop waiting for a result and<br />

allows input of a new statement. Any remaining portions of the statement are<br />

discarded and the task that ran the function call is deleted.<br />

Pressing CTRL+C is also necessary to regain control of the shell after calling a<br />

routine on the target that ends with exit( ) rather than return.<br />

Occasionally a subroutine invoked from the shell may incur a fatal error, such as a<br />

bus/address error or a privilege violation. When this happens, the failing routine<br />

is suspended. If the fatal error involved a hardware exception, the shell<br />

automatically notifies you of the exception. For example:<br />

2. The interrupt character matches whatever you normally use in UNIX shells as an interrupt;<br />

you can set it with the UNIX command stty intr. See your host system documentation for<br />

details.<br />

173

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

Saved successfully!

Ooh no, something went wrong!