Setting Debug Zone Parameters (Windows Embedded CE 6.0)
1/5/2010
The DBGPARAM structure holds debug output information according to the parameters set in the global variable dpCurSettings.
The following fields are defined by dpCurSettings.
Field | Description |
---|---|
Module name |
Used to look for debug zone initialization information in the registry of the development workstation and the registry of the target device. This name should match the DLL or EXE name as closely as possible, because this is the name that the debug shell uses to identify it. |
Debug zone name |
Shows the names of the debug zones that are displayed by a control application, such as Target Control, that allows the user to set zones. The control application turns the debug zones on or off. |
Initial debug zone mask |
Defines which zones are enabled by default, and turns on specific debug zones during startup. Restrict this setting to messages that are important. Otherwise, a large amount of debug spew is generated during boot. |
The following code example shows a DBGPARAM structure in the application's source code for the previously defined debug zones and debug zone masks.
DBGPARAM dpCurSettings = {
//Process or module name, DbgSamp1
TEXT("DbgSamp1"),
{ // Descriptive names for 16 zones
TEXT("Init"),TEXT("Seconds"),TEXT("Except"),TEXT(""),
TEXT(""),TEXT(""),TEXT(""),TEXT(""),
TEXT(""),TEXT(""),TEXT(""),TEXT(""),
TEXT(""),TEXT(""),TEXT("Warnings"), TEXT("Errors")
},
// Zones enabled by default
ZONEMASK_ERROR|ZONEMASK_INIT
};
In this example, DbgSamp1 is either a process or module name. This name is followed by descriptive names for the 16 debug zones that are defined in the application's header file.
The descriptive names are listed in order of their bit position. The debug zone corresponding to 0x01 is listed first and the debug zone corresponding to 0x8000 is listed last.
ZONEMASK_ERROR and ZONEMASK_INIT, are two of the 16 debug zones. These two zones are turned on when the application starts. The names Init and Errors will appear in output, and correspond to the debug zones ZONEMASK_INIT and ZONEMASK_ERROR.