How To Start The Kernel Debugger

Table of contents:

How To Start The Kernel Debugger
How To Start The Kernel Debugger

Video: How To Start The Kernel Debugger

Video: How To Start The Kernel Debugger
Video: Setting Up Windows Kernel Debugging 2024, May
Anonim

Debugging is an important part of the software development process. For application programs, it is done in user-mode tools and is often built into the IDE. But in order to be able to debug, for example, drivers, you need to start the kernel debugger.

How to start the kernel debugger
How to start the kernel debugger

Necessary

administrator rights on the target machine

Instructions

Step 1

Start command processor cmd. Click on the "Start" button in the taskbar. Click on the "Run …" item in the menu that appears. In the Run Program dialog box, enter cmd and click OK

Step 2

Make a backup copy of the boot.ini file. Find out the installation path of the current copy of Windows using the command: echo% SystemRoot% Go to the drive where the operating system is installed by entering the device letter followed by a colon. Change to its root directory using the cd command. Remove the system, read-only, and hidden attributes from the boot.ini file using the attrib command, back it up with the copy command, and set the attributes again: attrib -h -s -r boot.inicopy boot.ini boot. ini.oldattrib + h + s + r boot.in

Step 3

Display the current list of download options. Use the command: bootcfg / query Review the items in the list and determine which one will be used to create a new configuration with kernel debugging capabilities. Remember the ID of the boot record

Step 4

Create a new boot record by running the bootcfg command with the / copy option. Use the / id parameter to specify the id of the entry to be copied. Use the / d parameter to specify a display name for the entry. For example: bootcfg / copy / id 1 / d "Win XP (Debug)" List the boot options again using the bootcfg command with the / query parameter and find out the ID of the added entry

Step 5

Include options to run the kernel debugger in the boot record created in the previous step. If debugging will be done on the target machine, just add the / debug option. For example: bootcfg / debug on / id 2 If you are planning remote debugging with connecting the target computer to the host machine via the com port, additionally use the / port / baud options to specify the port number and baud rate, respectively: bootcfg / debug on / port COM2 / baud 9600 / id 2 If remote debugging will be performed using an IEEE 1394 interface (FireWire cable), use the / dbg1394 option to enable the appropriate mode and the / ch option to specify the channel number, for example: bootcfg / dbg1394 on / ch 42 / id 2 View boot records using the bootcfg command with the / query parameter and verify that the changes have been made. Close the shell window by running the exit command

Step 6

Change the boot parameters of the operating system, if necessary. Open the control panel using the appropriate item in the "Settings" section of the "Start" menu. Open the System item. In the "System Properties" dialog go to the "Advanced" tab. Click on the "Options" button located in the "Startup and Recovery" group. In the "Startup and Recovery" dialog that appears, activate the "Display a list of operating systems" option. Click the OK buttons in the last two open dialogs

Step 7

Reboot your computer. Select the boot option with a debugger. Log in and work on the target machine, or start a remote debugging session. Use tools like WinDbg and KD.

Recommended: