Re: 利用windbg API 没办法attach到本地内核调试

Windows内核调试

利用windbg API 没办法attach到本地内核调试


Abstr 2014-11-07, 15:00 下午
我使用windbg本身是可以开启本地内核调试,进入lkd状态。
bcdedit输出如下
Windows 启动加载器
-------------------
标识符                  {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  zh-CN
inherit                 {bootloadersettings}
osdevice                partition=C:
systemroot              \Windows
resumeobject            {b770871e-ca68-11e1-8846-ddc5cb9ebd0e}
nx                      OptIn
numproc                 1
usefirmwarepcisettings  No
debug                   Yes
------------------
可以看到已经启动了调试
但是以下代码
HRESULT hr;
IDebugClient* pDebugClient = NULL;
if(DebugCreate(__uuidof(IDebugClient), (void**)&pDebugClient) != S_OK)
printf("Debug Create failed\n");
hr = pDebugClient->AttachKernel(DEBUG_ATTACH_LOCAL_KERNEL, NULL);
if(hr != S_OK)
{
printf("Attach Local Kernel failed with %x\n", hr);
}
return 0;
却输出
Attach Local Kernel failed with 80004001
不知道为什么

Re: 利用windbg API 没办法attach到本地内核调试


格蠹老雷 2014-11-08, 21:24 下午
Error code: (HRESULT) 0x80004001 (2147500033) - Not implemented

估计你是在使用系统目录中的dbgeng.dll,将WinDBG目录中的dbgeng.dll复制到你的exe目录试一下

Powered by Community Server Powered by CnForums.Net