SOM Debugging


The SOM run-time library provides a means of generating character output by invoking macros and functions that call a replaceable SOM procedure called SOMOutCharRoutine. These macros and functions are available to assist you with debugging an application. Output generated by the debug macros can be conditionally suppressed or produced based on the setting of four global variables. The following table summarizes the SOM debugging macros and the global variables that affect them:

┌──────────────────────────────┬──────────────────────────────┐
│Macro                         │Control Variables             │
├──────────────────────────────┼──────────────────────────────┤
│SOM_Assert                    │SOM_AssertLevel               │
├──────────────────────────────┼──────────────────────────────┤
│SOM_Expect                    │SOM_WarnLevel                 │
├──────────────────────────────┼──────────────────────────────┤
│SOM_TestC                     │SOM_WarnLevel                 │
├──────────────────────────────┼──────────────────────────────┤
│SOM_WarnMsg                   │SOM_WarnLevel                 │
└──────────────────────────────┴──────────────────────────────┘

In addition to the debug macros, SOM provides a function, somPrintf, that unconditionally generates character output. The interface to somPrintf is identical to the C-library printf routine.

Note: For more detail on debugging SOM, see Debugging Workplace Shell Applications.