Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. Debugging Kernel Mode Driver using Windbg

Debugging Kernel Mode Driver using Windbg

Scheduled Pinned Locked Moved Hardware & Devices
debugginghelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    msr_codeproject
    wrote on last edited by
    #1

    Hi, I have a sample OSR USB board and I have written a sample driver for this USB board. I have built this driver and able to install. But I am not able to debug this driver using Windbg since it is kernel driver. OS: Win7

    #include ntddk.h

    DRIVER_UNLOAD DriverUnload;

    void DriverUnload(PDRIVER_OBJECT pDriverObject)
    {
    DbgPrint("Driver Unload\n");
    }

    NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath)
    {
    pDriverObject->DriverUnload = DriverUnload;
    DbgPrint("Driver Entry : Hello Windows Device Driver World!\n");
    return STATUS_SUCCESS;
    }

    Can anybody help me in debugging my driver?

    L 2 Replies Last reply
    0
    • M msr_codeproject

      Hi, I have a sample OSR USB board and I have written a sample driver for this USB board. I have built this driver and able to install. But I am not able to debug this driver using Windbg since it is kernel driver. OS: Win7

      #include ntddk.h

      DRIVER_UNLOAD DriverUnload;

      void DriverUnload(PDRIVER_OBJECT pDriverObject)
      {
      DbgPrint("Driver Unload\n");
      }

      NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath)
      {
      pDriverObject->DriverUnload = DriverUnload;
      DbgPrint("Driver Entry : Hello Windows Device Driver World!\n");
      return STATUS_SUCCESS;
      }

      Can anybody help me in debugging my driver?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      In system config on the target you need to enable kernel debug specifying firewire of serial. Hook the target to the host with tht relevant cable. Turn off the target. Run windbg on the host and set it to kernel debug on the relevant interface (firewire or serial). Restart the target and it should connect and you will see a lot of debug data. You then set the path in windbg for the symbols and code for your driver (and use the global microsoft symbol server for their code, search in help for symsrv), then you can set breakpoints and step through your code.

      ============================== Nothing to say.

      1 Reply Last reply
      0
      • M msr_codeproject

        Hi, I have a sample OSR USB board and I have written a sample driver for this USB board. I have built this driver and able to install. But I am not able to debug this driver using Windbg since it is kernel driver. OS: Win7

        #include ntddk.h

        DRIVER_UNLOAD DriverUnload;

        void DriverUnload(PDRIVER_OBJECT pDriverObject)
        {
        DbgPrint("Driver Unload\n");
        }

        NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath)
        {
        pDriverObject->DriverUnload = DriverUnload;
        DbgPrint("Driver Entry : Hello Windows Device Driver World!\n");
        return STATUS_SUCCESS;
        }

        Can anybody help me in debugging my driver?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        So you are a supposedly Senior Software developer, yet you cant read simple documentation, for which there is plenty available, and then, when I give you the answer you dont ever bother responding. What a joke you are!

        ============================== Nothing to say.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups