【问题标题】:Enable Kernel Debuggin in Windows Server 2008 R2 Standard在 Windows Server 2008 R2 Standard 中启用内核调试
【发布时间】:2014-10-01 20:16:32
【问题描述】:

我正在尝试在 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

【问题讨论】:

  • 在 Windows 7 上,我可以通过运行“bcdedit -debug on”然后重新启动机器来进行本地内核调试。我使用的是 x64 版本的 Windows,它仅在使用 WinDbg (x64) 时有效。

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


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    要调试本地内核,你必须给出这个命令并重启。

    bcdedit -debug on
    

    重启后,打开已检查的构建环境 NOT free build并启动windbg。

    【讨论】:

    • 什么是“打开检查构建环境而不是免费构建”?
    • 恕我直言,我们使用的每日 Windows 构建都是免费构建的。已检查的构建未经过编译器优化,它们可以与私有 PDB 中的私有令牌一起使用,这通常对我们不可用。
    【解决方案3】:

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

    【讨论】:

    • 如果不可能的话,“内核调试”中的“本地”选项卡就不会存在:)
    • 在 Windows Server 2012 上我取得了成功:内核调试 -> 本地 + .server tcp:port
    • 这不是经典调试,您只能查看 km 内存并读取值:“通常,您不能使用任何导致目标计算机停止的命令,即使是暂时停止,因为您无法恢复操作。” msdn.microsoft.com/en-us/library/windows/hardware/…
    猜你喜欢
    • 1970-01-01
    • 2014-03-27
    • 2014-09-12
    • 2011-08-01
    • 1970-01-01
    • 2016-12-21
    • 2011-06-15
    • 1970-01-01
    相关资源
    最近更新 更多