how to debug Winsock Kernel driver

Sysprogs forums Forums VisualDDK/VirtualKD discussion how to debug Winsock Kernel driver

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #259
    bmobile
    Participant

    I’m new to driver development and VisualDDK. I would like to port the Winsock portion of a Windows Service I have to Winsock Kernel. My development environment is VS2010 on Windows 2008 host and guest (running under Virtual Server).
    I’ve managed to create a sample driver using VisualDDK bytaking all of the defaults. I can deploy to the guest os, set breakpoints, and debug the application (VisualDDK is very impressive!!). My next step is to import the WSK echosrv (in the WindowsDDK net samples) into Visual Studio using VisualDDK. I did this and it generated the project etc. for me. I can compile the driver and attempt to launch the debugger. VisualDDk will copy the driver to the drivers folder on the guest machine. However, I’m stuck now trying to either launch the service to attach to or get VisualDDK to debug the driver. I would like to set breakpoints in the code like I did with the sample project that I first generated with VisualDDK but no luck. From what I can tell, I need to register the echosrv.sys as a service and then start it. How can i do this through VisualDDK so I can debug the driver entry and other parts of the driver? Any help will be greatly appreciated.

    #1604
    bmobile
    Participant

    Update to this thread: I’ve was able to run the command to register the echosrv.sys service on the guest os. In VisualDDK debugger options, I set the start command to sc start echosrv and the stop command to sc stop echosrv. This worked several times until I ended the debug session. Anytime after this when I tried to debug the driver, I got a message that state the named pipe was in use and if I had windbg open, I should close it. Is there a correct way to end/stop debugging so that the named pipe is not left open. Or, is there a way to close the pipe? Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.