|
|
udi_debug_break(3udi)
Request a debug breakpoint at the current location
#include <udi.h>void udi_debug_break ( udi_init_context_t *init_context, const char *message );ARGUMENTS init_context is the initial context supplied to the driver on the primary region's management channel.
message is a string used to indicate the cause of the debug break.
DESCRIPTION The udi_debug_break function is used for driver debugging purposes. In a debug configuration, calling this routine indicates that a system debugger, if present and available, should be entered at the current time for developer debugging operations.
The init_context argument is used to identify which driver region is issuing the breakpoint. This allows environments to selectively set breakpoints for specific regions as identified by their init_context values..
The implementation of this function is environment dependent and the actions taken may be defined by an operational mode of that UDI environment.
Example An example implementation of the udi_debug_break utility might distinguish between a debug and a non-debug environment, where the former is identified for driver development and the latter is typically the production environment.
In debugging mode, the message string would be output to the debug console and the debugger is entered in the context of the thread that called this function. The operator can then perform various debugging operations and then resume normal execution, which will cause this function to return to the caller for continued execution of UDI driver code.
In a non-debugging mode, the environment may completely ignore this request and simply return immediately to the UDI driver code.