Search code examples
debuggingwindowkernelwindbgwindows-kernel

What is the fastest connection method to debug a windows 10/7 kernel using windbg?


There seems to be many methods for debugging a windows 10/7, including USB or network or COM

But which of them is the fastest? I have only used COM and it seems to be really slow compared to debugging a local usermode application, was wondering what is the fastest method? is there any method that makes debugging kernel as fast as user-mode apps or close?

by fast I mean for example the amount of time for the single steps to take or amount of time for windbg to execute commands, because right now even the simplest commands sometimes take too long

Also what is the fastest method for windows 7?


Solution

  • There are two factors coming in: baud rate (data transfer rate) and response time (ping time). It depends much on what task you perform.

    Creating a full memory kernel crash dump will likely transfer a lot of data, so a higher bandwidth is helpful.

    On the other hand side, sending small WinDbg commands like k or | have just small amount of data, but you typically send it and wait for the answer. In that case, the response time has more effect.

    For baud rates:

    • COM port is a serial port and can be configured from 75 baud up to 2 MBit/s.
    • USB depends on the version and has 12 MBit/s up to 10 GBit/s on USB 3.2 generation 2.
    • Firewire is available from 100 MBit/s to 3200 MBit/s.
    • Network, well has typical values from 10 MBit/s to 10 GBit/s. But of course if you debug over the Internet, it won't be faster than your DSL or cable modem.

    For ping time:

    • USB has a response time of less than 1 ms, but that may depend on how many devices you connect.
    • A local full duplex network also has a response time of less than 1 ms.
    • Debugging over the Internet is pretty slow with 20 ms up to 300 ms.

    From an availability and cost standpoint, I would start with a 1 GBit/s network connection. If you don't have that yet, you can buy a cheap Gigabit USB adapter for 12 € or so.

    which of them is the fastest?

    As I hopefully explained well enough, that's a question which can only be answered when we know the exact situation

    I have only used COM and it seems to be really slow

    Yes. It is.

    right now even the simplest commands sometimes take too long

    From a performance view, that's not something we can work with. If you define performance requirements, we'd need to know a) how fast is it now and b) how fast is acceptable for you.

    What is the fastest method for windows 7?

    I don't think the operating system matters much here.