Hello everyone. I thought I would learn to use the kernel debugging tools, and I have hit a number of snags. I’m wondering if I am missing some instructions somewhere, or it really is tricky. Let me enumerate…
- My target computer doesn’t have a COM port, so I went out and bought a USB 2.0 cable. That didn’t work. The Debugger docs say that some special hardware is needed and that it might not work, and no way to find out.
- I bought a PCI serial card and a null modem cable. And boy, were those hard to find, they’re mucho obsolete. My host and target computers can successfully send data back and forth between their COM ports. But still no success with debugging.
- Adding the /debug to the boot.ini (or selecting debug option with F8 during bootup) resulted in the system freezing after a couple of minutes. I have found that when I remove all startup applications, it doesn’t freeze, so apparently one of those applications causes the freeze when it launches.
- Now that my target doesn’t freeze, I try to connect with the debugger. With windbg -k com:port=com1,baud=19200, it sets in “waiting to reconnect…”, and the status bar says debuggee not connected. Similarly with KD.
- I try the .crash and .restart and .reboot commands in KD, to no avail. I have the impression that while it is waiting to reconnect, KD does not respond to anything except the control characters. This is because I type in some nonsense and it says nothing about it either. I guess it is just storing what I typed until it is ready to do something with it.
- I have also tried starting the debugger while the target is running, and rebooting the target while the debugger is waiting to reconnect. Nothing.
Anyway, I have no clue whether anything is being exchanged between host and target at all.
I’m sure you experts have been doing debugging for years, and not just local mode or softIce, which just analyze a snapshot of the kernel state like it’s a crashdump.
So, could someone who has actually been doing debugging over a serial cable please tell me what all the steps are, or at least point me to a good reference resource?
You guys at Microsoft, I have a complaint that it’s too darned hard to use the debugger. For one thing, the communication only has three obscure hardware options. And it would be nice to document more about exactly what the /debug boot switch does to affect the kernel’s behavior. I don’t think it should be necessary for a company to hire a team of seasoned experts just to create drivers to go with some nice new hardware – it really raises the cost of entry into the marketplace a lot, and this makes for less available peripherals and a smaller demand for computers and ultimately a smaller demand for the Windows operating system. I suggest that anything you can do to actively make it easier to write drivers will pay dividends to you. IMHO.
Thank you.