TPF_TC_DEBUG: Include debug output message for a test case

This C/C++ macro constructs a debug output message for a test case. The debug messages can be optionally enabled to add more granular diagnostics or debugging information without changing the code.

Last updated

Added for PUT15.

Format

maketpf_env += idevops
#include <tpf/c_devops.h>
void TPF_TC_DEBUG(printfFormatting);
printfFormatting
The format specification and associated optional parameters that adhere to the syntax requirements for the printf standard C function.

Normal return

None.

Error return

If a test case handle is not set, the DE1045 system error is issued and the ECB exits.

Programming considerations

  • Do not use this macro in production applications.
  • The message text that is associated with the TPF_TC_DEBUG macro is included only when you enter the ZDEVO RUN command with the DEBUG parameter specified.
  • A new line character (\n) is automatically appended to the end of the message text.

Examples

The following example includes a constructed message when the DEBUG parameter is specified on the ZDEVO RUN command.

char *area = calloc(10);
if (area != NULL) {
  TPF_TC_DEBUG(“Calloc returned pointer %p”,  area);
} else {
…
}