Troubleshooting: Debugging a Driver (Windows CE 5.0)
The following table shows descriptions and resolutions of problems you may encounter while debugging your driver.
|You want to debug or run specific modules, but you do not want to include them or cannot include them in your run-time image.||Establish a debug connection to your platform, and then place the modules in the %_FLATRELEASEDIR% on your host computer.|
|The terminal emulator on your development workstation is not receiving output from the serial port on your target device.||Ensure that you have the correct connection setting. The following list shows the correct connection settings:
|You cannot set breakpoints.||Ensure that your .dll, .pdb, and .map files are in the release directory for your project.
For more information on release directories, see Troubleshooting: Building a Driver.
You can set a breakpoint by modifying the executed code. Breakpoints insert an invalid instruction, and the debugger takes control. You cannot debug a .dll or .exe file that is executing out of flash memory or ROM unless you perform one of the following tasks:
|Platform Builder does not recognize your breakpoints.||Ensure that the run-time image is in a break state. If you have a connection to your target device and your run-time image is running, from the Debug menu, choose Break. You can now set breakpoints. You can also set breakpoints before downloading your run-time image to the target device.
If this solution does not work, insert the DebugBreak macro in your source code where you would like execution to stop. This causes a breakpoint exception to occur in the current process so that the calling thread can signal the debugger in all cases.
|You want debug messages from system DLLs.||From the Target menu, choose Debug Zones. A list of the currently loaded DLLs appears. Choose the DLL that you want to debug, and then a list of debug zones will appear. Select the debug zones that you want to activate. The debug tab in the output window displays the debug messages.
You can set debug zones under the HKEY_CURRENT_USER\Pegasus\Zones registry key on the development workstation.
You can also set debug zones under the HKEY_LOCAL_MACHINE\DebugZones registry key on the target device. This will work even if you have not enabled target control. Either of these methods allows you to set default values for the debug zones so you can retrieve debug information when the module is loaded for the first time. If you have access to the source code, you can edit the ulZoneMask value in the dpCurSettings data structure contained in the module, and then recompile the source code.
For more information, see Debug Zone Registration.
Send Feedback on this topic to the authors