Build correct debug symbol information for VXD

0 Likes

Problem:

I use Windows 9x DDK to build my VxD driver. I cannot see the symbols and source code in SoftICE, or I get the error message "Invalid executable.." from symbol loader.

Resolution:

The most likely problem is that the debug information was left out of the build process.

Compiler -

/Zi - This is comparable to Visual Studio under Projects Settings, then the C/C tab, in the Category list box have General selected. Then in the Debug info list box select Program Database). In makefile change is made in the CFLAGS or/and CVXDFLAGS. Be sure to remove the /Zdp.

/Od - This is comparable to Visual Studio under Projects Settings, then the C/C tab, in the Category list box have General selected. Then the optimizations should be Disable (Debug). In makefile change is made in the CFLAGS or/and CVXDFLAGS. Be sure to remove the /Oy1.

Linker -

/debug:full - In Visual Studio it is under Projects Settings, then the Link tab, under the category Debug. The Debug Info check box should be checked. In makefile change is made in the LFLAGS.

/debugtype:cv - In Visual Studio it is under Projects Settings, then the Link tab, under the category Debug. The Debug Info radio button should be Microsoft Format. "Note the /debugtype:cv is the default and does not show it can be added manually in the text box.". In makefile change is made in the LFLAGS.

/pdb:<name>.pdb - In Visual Studio it is under Projects Settings, then the Link tab, under the category Customize. The Program DataBase Name should be the name of the pdb file you want. "Note the default is the name of the executable with the pdb extension". In makefile change is made in the LFLAGS.

/pdbtype:con - In Visual Studio it is under Projects Settings, then the Link tab, under the category Debug. The Separate types box should be off. "Note the default is the off position". In makefile change is made in the LFLAGS.

/mapinfo:lines - In makefile change is made in the LFLAGS.

Make sure to check the MAKEFILE for other occurrences of DEBUG:NONE and PDB:NONE and change them accordingly. DEBUG:<Pdb filename>, DEBUG:full.

- Win98 DDK ships a link.exe that is not compatible with MSVC 6 compiler cl.exe, so 98ddk\bin\link.exe need to be renamed to link.ex

- Build driver. Open the .VXD or .SYS in symbol loader and load into SoftICE.

Old KB# 11001
Comment List
Anonymous
Related Discussions
Recommended