windows8 和 虚拟机XP 通过widbg进行双机调试
1> windows8 安装好windbg。建立桌面快捷方式,右键属性,目标编辑框中追加 -b -k com:pipe,port=\\.\pipe\com_1,baud=115200,reconnect -y 注意在双引号外面
本机windbg的桌面快捷方式属性中的目标为"C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\windbg.exe" -b -k com:pipe,port=\\.\pipe\com_1,baud=115200,reconnect -y
2>安装好虚拟机,装上XP操作系统。
编辑虚拟机设置->添加->串行端口
使用命名管道 设置为: \\.\pipe\com_1 该端是服务器 另一端是应用程序
3>开启虚拟机XP
打开C:\boot.ini,追加下面内容:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional-Debug" /noexecute=optin /fastdetect /debug /debugport=com_1 /baudrate=115200
整个boot.ini 文件内容如下:
[boot loader]
timeout=30
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" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional-Debug" /noexecute=optin /fastdetect /debug /debugport=com_1 /baudrate=115200
4>启动虚拟机XP,选择"Microsoft Windows XP Professional-Debug"模式,然后打开windows8中的windbg快捷方式,会看到:
Microsoft (R) Windows Debugger Version 6.3.9600.16384 X86
Copyright (c) Microsoft Corporation. All rights reserved.
Opened \\.\pipe\com_1
Waiting to reconnect...
Connected to Windows XP 2600 x86 compatible target at (Wed Jun 4 20:37:26.058 2014 (UTC + 8:00)), ptr64 FALSE
Kernel Debugger connection established.
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
* Use .symfix to have the debugger choose a symbol path. *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
* *
* The Symbol Path can be set by: *
* using the _NT_SYMBOL_PATH environment variable. *
* using the -y <symbol_path> argument when starting the debugger. *
* using .sympath and .sympath+ *
*********************************************************************
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntkrpamp.exe -
Windows XP Kernel Version 2600 MP (1 procs) Free x86 compatible
Built by: 2600.xpsp.080413-2111
Machine Name:
Kernel base = 0x804d8000 PsLoadedModuleList = 0x8055e720
System Uptime: not available
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntkrpamp.exe -
nt!RtlUnwind+0xdc0:
80532eb2 cc int 3
说明已经成功
1> windows8 安装好windbg。建立桌面快捷方式,右键属性,目标编辑框中追加 -b -k com:pipe,port=\\.\pipe\com_1,baud=115200,reconnect -y 注意在双引号外面
本机windbg的桌面快捷方式属性中的目标为"C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\windbg.exe" -b -k com:pipe,port=\\.\pipe\com_1,baud=115200,reconnect -y
2>安装好虚拟机,装上XP操作系统。
编辑虚拟机设置->添加->串行端口
使用命名管道 设置为: \\.\pipe\com_1 该端是服务器 另一端是应用程序
3>开启虚拟机XP
打开C:\boot.ini,追加下面内容:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional-Debug" /noexecute=optin /fastdetect /debug /debugport=com_1 /baudrate=115200
整个boot.ini 文件内容如下:
[boot loader]
timeout=30
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" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional-Debug" /noexecute=optin /fastdetect /debug /debugport=com_1 /baudrate=115200
4>启动虚拟机XP,选择"Microsoft Windows XP Professional-Debug"模式,然后打开windows8中的windbg快捷方式,会看到:
Microsoft (R) Windows Debugger Version 6.3.9600.16384 X86
Copyright (c) Microsoft Corporation. All rights reserved.
Opened \\.\pipe\com_1
Waiting to reconnect...
Connected to Windows XP 2600 x86 compatible target at (Wed Jun 4 20:37:26.058 2014 (UTC + 8:00)), ptr64 FALSE
Kernel Debugger connection established.
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
* Use .symfix to have the debugger choose a symbol path. *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
* *
* The Symbol Path can be set by: *
* using the _NT_SYMBOL_PATH environment variable. *
* using the -y <symbol_path> argument when starting the debugger. *
* using .sympath and .sympath+ *
*********************************************************************
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntkrpamp.exe -
Windows XP Kernel Version 2600 MP (1 procs) Free x86 compatible
Built by: 2600.xpsp.080413-2111
Machine Name:
Kernel base = 0x804d8000 PsLoadedModuleList = 0x8055e720
System Uptime: not available
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntkrpamp.exe -
nt!RtlUnwind+0xdc0:
80532eb2 cc int 3
说明已经成功