Building DbgEng Extensions
All debugger extensions should be compiled and built by using the Build utility. The Build utility is included in the Windows Driver Kit (WDK), as well as earlier versions of the Windows DDK.
For documentation on the Build utility, open the WDK documentation, select the Index tab, and type Build utility.
Note the following points:
The WDK has several different build environment windows. Each of these has a corresponding shortcut placed in the Start menu when the WDK is installed. To build a debugger extension, you must use the Windows Server 2003 build environment -- regardless of what platform you will be running the extension on.
The Build utility is usually not able to compile code that is located in a directory path containing spaces. Your extension code should be located in a directory whose full path contains no spaces. (In particular, this means that if you install Debugging Tools for Windows to the default location -- Program Files\Debugging Tools for Windows -- you will not be able to build the sample extensions.)
To build an extension, use the following procedure:
To build a debugger extension
Open the Windows 2003 Server Build Environment window. (You can choose either the "free" version or the "checked" version -- they will give identical results unless you have put #ifdef DBG statements in your code, because DBG is set to TRUE in the checked build environments.)
- Set the %DBGSDK_INC_PATH% and %DBGSDK_LIB_PATH% environment variables to specify the paths to the debugger SDK headers and the debugger SDK libraries, respectively. If %debuggers% represents the root of your Debugging Tools for Windows installation, these variables should be set as follows:
set DBGSDK_INC_PATH=%debuggers%\sdk\inc set DBGSDK_LIB_PATH=%debuggers%\sdk\lib
If you have moved these headers and libraries to a different location, specify that location instead.
Change the current directory to the directory containing your extension's dirs file or sources file.
- Run the Build utility:
For a full explanation of these steps, and for a description of how to create a dirs file and a sources file, see the Build utility documentation in the WDK.
Build date: 1/27/2014