2

I am new to windows driver development, so please bear with me if my question is being too stupid. Well, I am not sure why, as MSDN suggested and also the way I perceived, the host computer, e.g developing the driver, and the target computer, e.g debugging the driver, need to be two separate ones. why such separation? I did try to merge those two by deploying and debugging a driver on the host computer, in which I am developing a driver, and it seemed work with no objection from windows. Thanks.

PS. Source like this http://msdn.microsoft.com/en-us/library/windows/hardware/hh698272(v=vs.85).aspx got me think so.

Cong Hui
  • 633
  • 1
  • 13
  • 25

3 Answers3

2

Practically, when you are developing and testing a driver, in many situation you will get system crash (BSOD) and your system may not be bootable. In such situations your development + debugger environment is also gone/in-accessible.

Rohan
  • 52,392
  • 12
  • 90
  • 87
  • When we say testing a driver, do we need a device for that or did Microsoft expose some simulator or emulator kind of an interface to test the driver?? – DeveloperLove Feb 27 '13 at 09:28
  • @DeveloperLove, If you are writing driver for some actual hardware device, then you will have to plug it in. But if driver is not actually for physical device like filesystem filter driver, you don't need anything extra. Hope this explains. – Rohan Feb 27 '13 at 09:46
  • Thanks Rohan for ur reply.. Like I am starting with development on Windows drivers.. I thought I would start with Audio drivers.. But as u told for that we need to have some device.. so with USB can I start and get ahead? And, I have doubt like can we also play around with audio, image , display drivers? As devices wrt to these drivers are already a part of my PC... – DeveloperLove Feb 27 '13 at 10:26
  • @DeveloperLove, I don't have much knowledge about audio/image/display drivers, so can't suggest. – Rohan Feb 27 '13 at 10:32
0

Two separate machines are required for kernel debugging. You cannot debug self by obvious reasons (a debugger and a debuggee are in the same kernel and a deadlock appears). Of course, the target machine can be a virtual one.

Sergey Podobry
  • 7,101
  • 1
  • 41
  • 51
0

When we develop a driver and test it the system will crash and a blue screen (called BSOD - blue screen of death)will show up. This is not the case like developing a User mode application and it crashed due to a memory error. Your driver will be running as a kernel mode application , If it crashes due to any illegal memory operation then the whole system is gone. It is not a simple issue to resolve , You need to log into safe mode and remove the driver from your system to recover it.

Due to this it is preferred to use a target machine mostly a VM on which the driver is installed and a host machine there we will be using a debugger to debug the driver.