Debugging
This section describes how to debug a custom c-tree Driver DLL.
To step through custom c-tree Driver DLL code using the Microsoft compiler, first add the necessary debug flags to the compiler (-Zi -Od) and link (-debug:full -debugtype:cv) options in otset32.mak:
LINK = $(coBIN)\link -debug:full -debugtype:cv
CFLAG2 = -c -DWIN32 -Zp1 -G3 -Gf -DotFOR_DLL -Zi -Od
After building the custom DLL, do the following:
- Start up the Microsoft Visual Studio.
- Select File | Open Workspace...
- Browse for the ODBC-compliant application that you want to run (for example, msqry32.exe if using Microsoft Query).
- Select Project | Settings... and click on the Debug tab.
- In the Category drop-down list, select “Additional DLLs”, and enter the full path and name of your custom DLL (ot_usr32.dll) in the list of modules. Click OK to save the change.
- Open otcustm.c (using File | Open...), and set breakpoints as desired.
- Press F5 to run the ODBC application. The application will break at the specified break
|