<< Click to Display Table of Contents >> Navigation: NxLib API > C Interface > Other > nxLibGetDebugBuffer |
Retrieves debug information in a binary format which can be read by NxProfiler. This can also be done remotely from NxLibRemote.
Note: Calling this function will temporarily lock all debug ring buffers and thus block all NxLib threads which are trying to push debug information onto their buffer. The user should therefore choose a point in time when NxLib is not performing time critical computations for his application to retrieve debug information.
Variants throwing exceptions on errors:
template <typename T> static void nxLibGetDebugBuffer(std::vector<T>& data, bool clearRead, bool* overflow)
data |
Vector to hold the retrieved debug information. The vector will be automatically resized to hold all available debug information. |
clearRead |
When set to true the operation will also remove the retrieved content from the debug buffer. |
overflow |
Indicates if the buffer has overflown since the last read operation and older debug information has been lost. |
none
Variants returning error codes in an int* parameter:
NXLIBINT nxLibGetDebugBuffer(NXLIBERR* result, void* destinationBuffer, NXLIBINT bufferSize, NXLIBINT* bytesRemaining, NXLIBBOOL clearRead)
result |
The error code of the operation. If the debug buffer could not hold all streamed debug information, the error code NxLibDebugMessageOverflow will be returned. |
destinationBuffer |
Pointer to an allocated memory block. |
bufferSize |
Size of destination buffer |
bytesRemaining |
Pointer to an integer. Will be set to the number of remaining bytes in the debug buffer after the read operation. |
clearRead |
When set to true the operation will also remove the retrieved content from the debug buffer. |
Number of bytes retrieved from the debug buffer.