Advanced Debugging
About AdvDbg Consult Train Services Products Tools Community Contact  
欢迎光临 高端调试 登录 | 注册 | FAQ
 
  ACPI调试
Linux内核调试
Windows内核调试
 
  调试战役
调试原理
新工具观察
 
  Linux
Windows Vista
Windows
 
  Linux驱动
WDF
WDM
 
  PCI Express
PCI/PCI-X
USB
无线通信协议
 
  64位CPU
ARM
IA-32
  CPU Info Center
 
  ACPI标准
系统认证
Desktop
服务器
 
  Embedded Linux
嵌入式开发工具
VxWorks
WinCE
嵌入式Windows
 
  格蠹调试套件(GDK)
  格蠹学院
  小朱书店
  老雷的微博
  《软件调试》
  《格蠹汇编》
  《软件调试(第二版)》
沪ICP备11027180号-1

Windows内核调试

帖子发起人: Abstr   发起时间: 2014-11-07 15:00 下午   回复: 1

Print Search
帖子排序:    
   2014-11-07, 15:00 下午
Abstr 离线,最后访问时间: 2016/10/9 8:03:06 Abstr

发帖数前50位
注册: 2014-11-05
发 贴: 22
Confused [8-)] 利用windbg API 没办法attach到本地内核调试
Reply Quote
我使用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
不知道为什么

IP 地址: 已记录   报告
   2014-11-08, 21:24 下午
Raymond 离线,最后访问时间: 2020/7/3 3:40:25 格蠹老雷

发帖数前10位
注册: 2005-12-19
发 贴: 1,303
Re: 利用windbg API 没办法attach到本地内核调试
Reply Quote
Error code: (HRESULT) 0x80004001 (2147500033) - Not implemented

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

IP 地址: 已记录   报告
高端调试 » 软件调试 » Windows内核调试 » 利用windbg API 没办法attach到本地内核调试

 
Legal Notice Privacy Statement Corporate Governance Corporate Governance
(C)2004-2020 ADVDBG.ORG All Rights Reserved.