How to breakpoint in code using Visual Softice. How to load the symbol tables and source files needed
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
<TD>Let's use the HelloWDM driver example that comes with DriverStudio as a means to demonstrate setting breakpoints. The following steps will walk you through a simple example of setting a breakpoint in either your driver or and application.
Note: This article does not provide setup instruction for Visual SoftICE. That can be found in the Using VSI.pdf file under 'Visual SoftICE Target Transport configuration'
1. Using Visual Studio compile both the driver and application for HelloWDM example.
2. Copy the driver '.sys' and the application '.exe' file to the target machine. You may also need to copy the '.inf' file for the driver so that you can install it. (For this example no modification to the .inf file are necessary.)
3. Load the driver on the target machine, you can use EzDriverInstaller to do this or any other standard means of loading a devive driver.
4. On the Host machine establish a connection to the target machine using Visual SoftICE. (Refer to Note above.)
5. From the Debug menu select 'Symbol Setting/Manage Tables'.
6. Press the add bottom and browse to the directory where the driver '.sys' file resides on your host system. Select the '.sys' file and select open.
7. Do the same as above for the HelloApp.exe file.
8. Close the Manage Tables dialog.
9. Next, from the Debug menu select 'Symbol Setting/Symbol Source Files.'
10. Select from the pull down list the symbol table you whish to load source files for, then select from the list the source file you wish to set the breakpoint in. For this example select HelloDev.cpp.
You can select multiple file a one time by holding down either the CTRL or Shift Key and select the files desired.
11. After you have selected all the files your whish to load press the open button and the close the dialog box.
12. The files you selected should be in the source window at this time. Select the HelloDev.cpp and scroll down to DeviceControl() method, clicked on the trace output line (T << 'entered DeviceControl(), code = ' << I.IoctlCode() << '
13. Here Press F9 to set the breakpoint. A Green dot should be placed in the left hand margin at this location.
14. You can verify the breakpoint by select the Breakpoint windows indicated by the BP tab next to the CMD tab in the bottom window.
15. Go to the target machine and from a command prompt run the HellApp.exe program that you copied back in step 2. You host machine should now display the breakpoint in the debugger.