KwikNet Overview
K
DAK
25
1.9 Debugging Aids
KwikNet includes a number of debug features which, if used effectively, can help you test
your networking application. These features can also be used to provide information to
KADAK's technical support staff should you require their assistance.
KwikNet's debugging services fall into the following categories: debug logging, breakpoint
traps and fatal error detection. Most of these features can only be used to best advantage
if your application provides a data log function as described in Chapter 1.6.
Debug Logging
To use KwikNet's debug logging features, you must first build the KwikNet Library to
include the extra code necessary to detect and record the events of interest. To do so, use
the
KwikNet Configuration Builder to edit your KwikNet Network Parameter File and view
the
Debug property page (see Chapter 2.3).
Check the box labeled "Informational messages". Doing so enables KwikNet to display
messages which indicate the operations being performed by KwikNet. These messages
provide a high level trace of the sequence of events as KwikNet executes.
If you check the box labeled "Error reporting", KwikNet will display warning messages if it
detects error conditions which, although abnormal, do impair the ability of KwikNet to
operate correctly. KwikNet will also display error messages if it detects serious error
conditions which compromise the integrity of KwikNet. These messages indicate that all
is not well with KwikNet.
Programmed Halt
If error reporting is enabled, you can check the box labeled "Halt on warnings/fatal errors".
In this case, whenever KwikNet generates a warning message or fatal error message, it will
immediately "stop" by spinning forever in the context of the task operating at the time the
fault was detected. Interrupts will remain enabled so that higher priority tasks will still
continue to execute in multitasking systems. But
KwikNet will be stalled, unable to
proceed.
Fatal Errors
Some of the errors detected by
KwikNet are serious enough to require that KwikNet cease
operation. To proceed would risk further corruption and would probably lead to a
catastrophic collapse in an unpredictable fashion.
When
KwikNet detects such a fatal error, it calls procedure kn_panic() which attempts to
log a message describing the fault and then stop the RT/OS. When used with AMX,
KwikNet forces an AMX fatal exit.
When testing, it is always wise to execute with a breakpoint on procedure kn_panic().
If you are using
KwikNet with AMX, you should also have a breakpoint on the AMX fatal
exit procedure cjksfatal (ajfatl and AAFATL for AMX 86).
Comments to this Manuals