Skip to content

Instantly share code, notes, and snippets.

@cji
Last active April 30, 2021 13:07
Show Gist options
  • Save cji/1afd0c1f8ed0f6a027cda41035d2ed21 to your computer and use it in GitHub Desktop.
Save cji/1afd0c1f8ed0f6a027cda41035d2ed21 to your computer and use it in GitHub Desktop.
Steps to successfully debug the Windows kernel between 2 VMWare VMs

Open the debugger VM's .vmx file. delete the existing serial0 lines (used for printing, not needed) add these lines:

serial0.present = "TRUE"
serial0.pipe.endPoint = "client"
serial0.fileType = "pipe"
serial0.yieldOnMsrRead = "TRUE"
serial0.tryNoRxLoss = "FALSE"
serial0.startConnected = "TRUE"
serial0.fileName = "/private/tmp/com1"

Repeat for the debugee, but add these lines:

serial0.present = "TRUE"
serial0.pipe.endPoint = "server"
serial0.fileType = "pipe"
serial0.yieldOnMsrRead = "TRUE"
serial0.startConnected = "TRUE"
serial0.tryNoRxLoss = "FALSE"
serial0.fileName = "/private/tmp/com1"

In the debugee, open an administrator command prompt and enter: bcdedit /set debug yes bcdedit /dbgsettings serial debugport:1 baudrate:115200 Run windbg x64 in the debugger Restart the debugee and pray

Resources:

@ech0matrix
Copy link

Thank you so much for this. I'm running on a Mac and needed to kernel debug a Windows VM. This all worked perfectly the first try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment