Function PGADebugPrint

Function Documentation

void PGADebugPrint(PGAContext *ctx, int level, char *funcname, char *msg, int datatype, void *data)

Write debugging information.

Description

Valid values for level are PGA_DEBUG_ENTERED, PGA_DEBUG_EXIT, PGA_DEBUG_MALLOC, PGA_DEBUG_PRINTVAR, PGA_DEBUG_SEND, and PGA_DEBUG_RECV. See Debugging Constants for the constants and chapter Debugging Tools in the user guide for details.

Valid values for the datatype argument are PGA_INT, PGA_DOUBLE, PGA_CHAR and PGA_VOID (no data). The parameter data should be NULL, for PGA_VOID. See Constants for Error Printing for the constants in the user guide for details.

Example

If the debugging level includes printing variables (level 82), print the value of the integer variable num as a debugging tool in the routine Add2Nums.

PGAContext *ctx;
int num;

...
PGADebugPrint
   ( ctx, PGA_DEBUG_PRINTVAR
   , "Add2Nums", "num = ", PGA_INT, (void *) &num
   );

Parameters
  • ctx – context variable

  • level – a symbolic constant that maps to the type of print requested (e.g., an entry or exit print).

  • funcname – the name of the function that called this routine

  • msg – message to print

  • datatype – a symbolic constant that maps to the data type of the parameter data

  • data – a pointer, whose contents will be interpreted based upon the datatype parameter

Returns

The debugging information is printed to stdout