在Windows Server 2008 R2 Standard中启用内核调试

时间:2013-12-19 09:21:58

标签: debugging windbg windows-server-2008-r2

我正在尝试在Windows Server 2008 R2 Standard中启用内核调试(在Windows Server 2012 R2上的Hyper-V中运行):

bcdedit /dbgsettings 1394 channel:32 
bcdedit /debug ON
shutdown /r /f /t 0

但是当我在WinDbg中运行时:

  

档案 - >内核调试 - >本地 - >确定

我看到消息框:

--------------------------- WinDbg:6.12.0002.633 AMD64 
--------------------------- The system does not support local kernel debugging.

Local kernel debugging requires Windows XP, Administrative
privileges, and is not supported by WOW64.
Only a single local kernel debugging session can run at a time.
Local kernel debugging is disabled by default in Windows Vista, you must run 'bcdedit -debug on' and reboot to enable it.
--------------------------- OK ---------------------------

bcdedit的输出:

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {22afa782-ce1f-11e2-824a-de42722e0fff
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows Server 2008 R2
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {22afa784-ce1f-11e2-824a-de42722e0fff
recoveryenabled         Yes
testsigning             Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {22afa782-ce1f-11e2-824a-de42722e0fff
nx                      OptOut
debug                   Yes

3 个答案:

答案 0 :(得分:0)

基本上你不能在本地调试内核。您需要两台独立的计算机(或vm guest + host)进行调试。

答案 1 :(得分:0)

正如声明所说,这仅适用于Windows XP。 对于本地内核调试,我总是使用SysInternals LiveKd

答案 2 :(得分:0)

要调试本地内核,您必须提供此命令并重新启动。

bcdedit -debug on

重启后,打开已检查的构建环境 非免费构建并启动windbg。