当前位置:网站首页>WinDbg and VMware double click debugging environment construction

WinDbg and VMware double click debugging environment construction

2020-12-08 08:47:16 osc_ u9mt0sus

Before we debug windows Program , Especially when debugging drivers , Because the driver is loaded when the operating system starts , So it's hard for us to debug , You have to double-click the debug environment , One of the machines loads the driver , Another machine to debug .

1. Environmental preparation

(1)VMware virtual machine , Install one Windows XP operating system ( because XP Less system resources , It can also be win7,win10,winserver,NT The operating systems are almost the same , It's not like tangled with specific system versions )
(2)WinDbg 32 position

2. Environment configuration

(1) Add a serial port to the virtual , Set as follows :
WinDbg And VMware Double click debug environment build

(2) start-up Windows XP, stay C Edit under the directory of rooting boot.ini file ( If the file can't be seen , You need to set Folder Options ),copy Start item , And paste a new line , Add after /debug /debugport=com1 (com The following figures are , Look at Device Manager )

[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional[Debug]" /noexecute=optin /fastdetect /debug /debugport=com1
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

(3) establish WinDbg_x86( because xp It's also 32 position ) Desktop shortcuts , Modify desktop shortcuts , add to :-b -k com:port=\.\pipe\com_1,pipe
WinDbg And VMware Double click debug environment build

3. test

(1) open winbg Desktop shortcuts , Turn it on ( virtual machine ), Select Start debug item
WinDbg And VMware Double click debug environment build
(2) The following interface appears , Virtual machine startup will interrupt , It shows that the configuration of the dual debugging environment is successful , At this time in kd> Enter... In the column g, enter , The system will continue to run .
WinDbg And VMware Double click debug environment build
(3) After system startup , You can click the interrupt button , You can enter the debug command again
WinDbg And VMware Double click debug environment build




版权声明
本文为[osc_ u9mt0sus]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/202012080845513897.html