Diagnostic trace functionsThese functions add diagnostic tracing to the generated code to assist in finding where a problem might occur.
More...
|
Defines |
|
#define | RTDIAG1(pctxt, msg) |
|
#define | RTDIAG2(pctxt, msg, a) |
|
#define | RTDIAG3(pctxt, msg, a, b) |
|
#define | RTDIAG4(pctxt, msg, a, b, c) |
|
#define | RTDIAG5(pctxt, msg, a, b, c, d) |
|
#define | RTDIAGU(pctxt, ucstr) |
|
#define | RTHEXDUMP(buffer, numocts) |
Functions |
| OSBOOL | rtxDiagEnabled (OSCTXT *pctxt) |
| | This function is used to determine if diagnostic tracing is currently enabled for the specified context.
|
| OSBOOL | rtxSetDiag (OSCTXT *pctxt, OSBOOL value) |
| | This function is used to turn diagnostic tracing on or off at run-time.
|
| void | rtxDiagPrint (OSCTXT *pctxt, const char *fmtspec,...) |
| | This function is used to print a diagnostics message to stdout.
|
| void | rtxDiagHexDump (OSCTXT *pctxt, const OSOCTET *data, OSUINT32 numocts) |
| | This function is used to print a diagnostics hex dump of a section of memory.
|
Detailed Description
These functions add diagnostic tracing to the generated code to assist in finding where a problem might occur.
Calls to these macros and functions are added when the -trace command-line argument is used. The diagnostic message can be turned on and off at both C compile and run-time. To C compile the diagnostics in, the _TRACE macro must be defined (-D_TRACE). To turn the diagnostics on at run-time, the rtxSetDiag function must be invoked with the value argument set to TRUE.
Function Documentation
|
|
This function is used to determine if diagnostic tracing is currently enabled for the specified context.
It returns true if enabled, false otherwise.
- Parameters:
-
| pctxt | Pointer to context structure. |
- Returns:
- Boolean result.
|
|
|
This function is used to print a diagnostics hex dump of a section of memory.
- Parameters:
-
| pctxt | Pointer to context structure. |
| data | Start address of memory to dump. |
| numocts | Number of bytes to dump. |
|
| void rtxDiagPrint |
( |
OSCTXT * |
pctxt, |
|
|
const char * |
fmtspec, |
|
|
|
... |
|
) |
|
|
|
|
This function is used to print a diagnostics message to stdout.
Its parameter specification is similar to that of the C runtime printf method. The fmtspec argument may contain % style modifiers into which variable arguments are substituted. This function is called in the generated code vai the RTDIAG macros to allow diagnostic trace call to easily be compiled out of the object code.
- Parameters:
-
| pctxt | Pointer to context structure. |
| fmtspec | printf-like format string specification |
| ... | Variable list of parameters to be substituted into the format string. |
|
|
|
This function is used to turn diagnostic tracing on or off at run-time.
The generated code must have been XBinder compiled with the -trace command-line option and C compiled with _TRACE defined for the code to be present.
- Parameters:
-
| pctxt | Pointer to context structure. |
| value | Boolean switch: TRUE turns tracing on, FALSE off. |
- Returns:
- Prior setting of the diagnostic trace switch in the context.
|
|