This is a mirror of official site: http://jasper-net.blogspot.com/

Setting up kernel mode debugger in windows

| Wednesday, November 24, 2010
Introduction

When ever there is a bug in your program you usually open a debugger(GDB,visual studio debugger etc) to fix it, but how do you debug a bug in the operating system? Do you load the running OS in to debugger? Is it possible? The simple answer is no, Because even the debugger works with the help of OS. Its a catch22 situation
History

Earlier developers used two machines one is the defective OS(slave) and other machine is the one containing debugger software(master).  Now the defective slave is connected to master machine using a high speed cable, and then both slave and master machines are started, with the help of debugger the execution of slave machine is  paused. But this solution have some drawbacks.  

The connection speed between the machines is too slow, because the data and commands should be passed to and fro between master and slave.
Require extra hardware like cable and two separate machines
Current Process

Fortunately we now have much better options for beginners who want to study the internals of the OS by debugging. With the help of virtual machines we now do not require two separate machines. The slave machine can be thought of as a guest VM and master machine can be thought of as a host computer(your real physical machine). The connection between these host and guest have been made even simpler with the help of a software called VirtualKD(Virtual Kernel Debugger)[with out this tool we have to manually set up a named pipe in the guest and modify boot.ini to enable some special options. Its little time consuming]. So in this tutorial I will help you set up kernel mode debugger.

I will be using following tools.

  • WinDbg (Windows Kernel Debugger) 
  • Virtual Box (Virtual Machine Manager) 
  • VirtualKD (Tool to enable very high speed kernel debugging between host and just machines)

here after when ever I refer to OS it will be one version of windows

Read more: Codeproject

Posted via email from .NET Info

0 comments: