O'Reilly logo

Professional Windows® Embedded Compact 7 by Thierry Joubert, David Jones, Samuel Phung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BREAKPOINTS

A simple mechanism for examining the functionality of a device driver is to put breakpoints at the start of each function. This can be used to simply check that the stream functions are being called. Also you can step through each function and examine how it performs, after a breakpoint has been reached. To do this though you need Kernel Debug and KITL enabled in the OS and the driver built with Debug enabled. If the OS is built in Debug mode, then you can step out of the driver and examine OS functionality. Also breakpoints can be put in the OS code where that source is available.

You can globally disable and re-enable existing breakpoints at a later stage when required. With Compact 7, Platform Builder breakpoints can have conditions. You can enable these as follows:

1. Create a breakpoint by clicking in the margin next to line for which the breakpoint is required.

2. Right-click the same line, Breakpoint/Breakpoint Properties, and then choose the Condition tab.

3. Enter the required condition.

The condition can be any expression that evaluates to true or false. There are a couple of variables that can be used in the expression:

  • $BPHITCOUNT — Can be used in the expression to make it conditional upon the number of breakpoint hits
  • $CALLSTACK — Contains (“functionname”) which returns true or false if the callstack (functions that have been called to get to this point) contains a certain function

When at a breakpoint you can check the values of variables and structures ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required