With VMware to achieve a single engine with WinDbg Author: JIURL Home: http://jiurl.yeah.net Date: 2003-10-3
In the debugger, Softice can be said to be Ding Ding. And Microsoft's debugger Windbg has a lot of useful features that Softice does not have. For people engaged in Windows system research and driver development, Windbg is really a good weapon, which is worth recommending. However, if you want to use it is not easy, it needs two computers, one debug, one debugging. This condition is very demanding for most people. Today we introduce a method of debugging using Windbg with a VMware. VMware Support said that WindBG after version 4.0.18.0 supports debugging through PIPE, but Microsoft does not have any instructions. So, in VMware, virtually debugged system, then via VMware virtual a COM port. With this virtual port, you can debug with Windbg. The specific steps are as follows: 1 Set VMware Virtual COM1.1 running VMware, click "Edit Virtual Machine Settings" 1.2 Click "Add ..." to run VMware's Hardware Wizard 1.3 Select "Serial Port", click "Next" 1.4 selection "Output to Named Pipe", click "Next" 1.5 in the first box to select "this end is the server." In the third box "The Other" "Connect At Power On" and then click "Advanced >>" 1.6 to select "Yield CPU On Poll" (this is mentioned in VMware Support), then done. 1.7 This will complete the setting of the virtual COM. 1.8 Restart. 2 Set the VMware virtual Guest OS Now Power ON virtual guest Guest OS2.1 Set Boot.ini in C: / Under, you can find boot.ini, you can open it with Notepad. We need to add some parameters on the Guest OS to you can use Windbg to debug it. We can directly add parameters after the existing line, but it is highly recommended to copy a new row, and add parameters after the new row. This way in the debug startup, we can make it easy to change back to the original startup. Below is the boot.ini I have changed. "Multi (0) Disk (0) RDisk (0) Partition (1) / Winnt =" Microsoft Windows 2000 Professional "/ fastdect" is the original line. "Multi (0) Disk (0) RDisk (0) Partition (1) / Winnt =" Microsoft Windows 2000 Professional - debug "/ fastdect / debug / debugport = com1 / baudrate = 115200" is my new future for Windbg Debug line.
-------------------------------------------------- ---------------------------------------- [boot loader] Timeout = 10DEFAULT = MULTI ( 0) DISK (0) RDisk (0) Partition (1) / WinNT [Operating Systems] Multi (0) Disk (0) RDisk (0) Partition (1) / Winnt = "Microsoft Windows 2000 Professional" / FastDetect Multi (0 (0) rdisk (0) Partition (1) / Winnt = "Microsoft Windows 2000 Professional - Debug" / fastdetect / debug / debugport = com1 / baudrate = 115200 -------------- -------------------------------------------------- --------------------------- Here to note that Timeout should not be 0, otherwise you will launch the default item directly. After the new row, the parameters / debug / debugport = COM1 / BaudRate = 115200 can be seen, and the debugport = COM1, BaudRate = 115200. The specific role of the parameters, you can refer to Windbg's help file. 2.2 Setting the speed of the COM1 port in the Guest OS device manager, the speed of the COM1 is also the "per second" item, set to the same 115200.3 settings Windbg, we need to tell Windbg to connect and connect via PIPE speed. You can add parameters to the command prompt (cmd.exe) --k COM: port = //. / PIPE / COM_1, Baud = 11520, PIPE runs Windbg (this parameter is not mentioned in VMware Support, in fact this is More important parameters). More convenient method is to create a Windbg shortcut at the desktop, in this shortcut, "Target" box, plus parameters --k COM: port = //. / Pipe / com_1, baud = 11520, PIPE. This is set to complete the settings that run this shortcut startup. The specific role of the parameters, you can refer to Windbg's help file. 4 Recommended Operation Sequence 4.1 Run VMware, start the guest OS, start the selection to the system, select the "Microsoft Windows 2000 Professional - Debug" item, please do not press Enter. 4.2 Running Windbg by setting a good shortcut just now. 4.3 Select "Microsoft Windows 2000 Professional - Debug" item in GUEST OS, press Enter. 4.4 Wait a moment, it is connected. If there is no connection for a long time, you can press "Debug" -> "RESYNCHRONIZE" in the Windbg menu. 4.5 Finally press "Debug" in the Windbg menu, you can command to WindBG.