news 2026/3/30 18:55:24

HalpClockInterrupt函数调试指南之每次都在call hal!HalBeginSystemInterrupt下断点和开启hal!HalBeginSystemInterrupt断点非常重要

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
HalpClockInterrupt函数调试指南之每次都在call hal!HalBeginSystemInterrupt下断点和开启hal!HalBeginSystemInterrupt断点非常重要

hal!HalpClockInterrupt函数调试指南之每次都在call hal!HalBeginSystemInterrupt下断点和开启hal!HalBeginSystemInterrupt断点

原则是用人家的时候在开启它,进入了函数后立马关闭,否则被优先级为0n29的抢占。

第一次调试记录:

0: kd> g
Breakpoint 20 hit
eax=00000041 ebx=f78cdff8 ecx=8999e620 edx=00001002 esi=00000000 edi=804edc60
eip=804ec714 esp=f78cdf5c ebp=f78cdf6c iopl=0 nv up di pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000046
hal!HalpClockInterrupt:
804ec714 54 push esp
0: kd> g
Breakpoint 26 hit
eax=00000041 ebx=f78cdf6c ecx=8999e620 edx=00001002 esi=00000000 edi=80b00720
eip=804ec7d0 esp=f78cdee0 ebp=f78cdef4 iopl=0 nv up di ng nz ac po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000092
hal!HalpClockInterrupt+0xbc:
804ec7d0 e85f210000 call hal!HalBeginSystemInterrupt (804ee934)
0: kd> t
Breakpoint 25 hit
eax=00000041 ebx=f78cdf6c ecx=8999e620 edx=00001002 esi=00000000 edi=80b00720
eip=804ee934 esp=f78cdedc ebp=f78cdef4 iopl=0 nv up di ng nz ac po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000092
hal!HalBeginSystemInterrupt:
804ee934 33c0 xor eax,eax
0: kd> g
Breakpoint 6 hit
eax=0002625a ebx=00000000 ecx=00000100 edx=00001002 esi=00000000 edi=80b00720
eip=80affa28 esp=f78cdeec ebp=f78cdef4 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!KeUpdateSystemTime:
80affa28 64803de405000000 cmp byte ptr fs:[5E4h],0 fs:0030:000005e4=01
0: kd> !irql
Debugger saved IRQL for processor 0x0 -- 28 (CLOCK2_LEVEL)
0: kd> be 21
0: kd> g
Breakpoint 21 hit
eax=0002625a ebx=00000000 ecx=00000100 edx=00001002 esi=80affb51 edi=80b00720
eip=804ee8d0 esp=f78cdee8 ebp=f78cdef4 iopl=0 nv up di pl nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000006
hal!HalEndSystemInterrupt:
804ee8d0 33c9 xor ecx,ecx
0: kd> bd 21
0: kd> kc 3
#
00 hal!HalEndSystemInterrupt
01 nt!KeUpdateSystemTime
02 nt!KiDispatchInterrupt
0: kd> g
Breakpoint 23 hit
eax=0002625a ebx=00000000 ecx=00000041 edx=00000041 esi=80affb51 edi=80b00720
eip=80affb5d esp=f78cdef4 ebp=f78cdef4 iopl=0 nv up di pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000046
nt!KeUpdateSystemTime+0x135:
80affb5d e926cbffff jmp nt!KiExceptionExit (80afc688)
0: kd> !irql
Debugger saved IRQL for processor 0x0 -- 2 (DISPATCH_LEVEL)

第二次调试记录:

0: kd> g
Breakpoint 20 hit
eax=00000041 ebx=f78cdff8 ecx=8999e620 edx=00001002 esi=00000000 edi=804edc60
eip=804ec714 esp=f78cdf5c ebp=f78cdf6c iopl=0 nv up di pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000046
hal!HalpClockInterrupt:
804ec714 54 push esp
0: kd> bp hal!HalpClockInterrupt+0xbc
breakpoint 26 redefined
0: kd> g
Breakpoint 26 hit
eax=00000041 ebx=f78cdf6c ecx=8999e620 edx=00001002 esi=00000000 edi=80b00720
eip=804ec7d0 esp=f78cdee0 ebp=f78cdef4 iopl=0 nv up di ng nz ac po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000092
hal!HalpClockInterrupt+0xbc:
804ec7d0 e85f210000 call hal!HalBeginSystemInterrupt (804ee934)
0: kd> be 25
0: kd> t
Breakpoint 25 hit
eax=00000041 ebx=f78cdf6c ecx=8999e620 edx=00001002 esi=00000000 edi=80b00720
eip=804ee934 esp=f78cdedc ebp=f78cdef4 iopl=0 nv up di ng nz ac po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000092
hal!HalBeginSystemInterrupt:
804ee934 33c0 xor eax,eax
0: kd> kc 4
#
00 hal!HalBeginSystemInterrupt
01 hal!HalpClockInterrupt

02 nt!KiDispatchInterrupt
03 hal!HalpDispatchInterrupt
0: kd> !Irql
Debugger saved IRQL for processor 0x0 -- 2 (DISPATCH_LEVEL)
0: kd> g
Breakpoint 6 hit
eax=0002625a ebx=00000000 ecx=00000100 edx=00001002 esi=00000000 edi=80b00720
eip=80affa28 esp=f78cdeec ebp=f78cdef4 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!KeUpdateSystemTime:
80affa28 64803de405000000 cmp byte ptr fs:[5E4h],0 fs:0030:000005e4=01
0: kd> !irql
Debugger saved IRQL for processor 0x0 -- 28 (CLOCK2_LEVEL)
0: kd> kc 3
#
00 nt!KeUpdateSystemTime
01 nt!KiDispatchInterrupt
02 hal!HalpDispatchInterrupt
0: kd> bd 25
0: kd> be 21
0: kd> g
Breakpoint 21 hit
eax=0002625a ebx=00000000 ecx=00000100 edx=00001002 esi=80affb51 edi=80b00720
eip=804ee8d0 esp=f78cdee8 ebp=f78cdef4 iopl=0 nv up di pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000002
hal!HalEndSystemInterrupt:
804ee8d0 33c9 xor ecx,ecx
0: kd> kc 4
#
00 hal!HalEndSystemInterrupt
01 nt!KeUpdateSystemTime

02 nt!KiDispatchInterrupt
03 hal!HalpDispatchInterrupt
0: kd> bd 21
0: kd> !Irql
Debugger saved IRQL for processor 0x0 -- 28 (CLOCK2_LEVEL)
0: kd> g
Breakpoint 23 hit
eax=0002625a ebx=00000000 ecx=00000041 edx=00000041 esi=80affb51 edi=80b00720
eip=80affb5d esp=f78cdef4 ebp=f78cdef4 iopl=0 nv up di pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000046
nt!KeUpdateSystemTime+0x135:
80affb5d e926cbffff jmp nt!KiExceptionExit (80afc688)
0: kd> kc 4
#
00 nt!KeUpdateSystemTime
01 nt!KiDispatchInterrupt
02 hal!HalpDispatchInterrupt
03 hal!KfLowerIrql
0: kd> !irql
Debugger saved IRQL for processor 0x0 -- 2 (DISPATCH_LEVEL)

第三部分:hal!HalpClockInterrupt调试指南之调试断点收集

6 e Disable Clear 80affa28 0001 (0001) nt!KeUpdateSystemTime

20 e Disable Clear 804ec714 0001 (0001) hal!HalpClockInterrupt

21 d Enable Clear 804ee8d0 0001 (0001) hal!HalEndSystemInterrupt

23 e Disable Clear 80affb5d 0001 (0001) nt!KeUpdateSystemTime+0x135

25 d Enable Clear 804ee934 0001 (0001) hal!HalBeginSystemInterrupt
26 e Disable Clear 804ec7d0 0001 (0001) hal!HalpClockInterrupt+0xbc

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/3/30 19:50:28

【医学研究者必看】:R语言下ROC曲线调优的5个隐藏陷阱与破解之道

第一章:临床数据中ROC曲线优化的核心挑战在临床医学研究中,ROC(受试者工作特征)曲线是评估诊断模型性能的关键工具。然而,在真实世界的应用场景下,其优化过程面临多重挑战,直接影响模型的泛化能…

作者头像 李华
网站建设 2026/3/24 10:41:50

(视频内容检索新突破):Dify模糊匹配如何实现毫秒级响应与高召回率

第一章:视频字幕检索的 Dify 模糊匹配在处理多语言视频内容时,精确查找特定语句或片段是一项挑战。Dify 平台提供的模糊匹配能力,结合自然语言处理技术,能够有效提升字幕检索的准确率与召回率。该机制不依赖完全一致的文本匹配&am…

作者头像 李华
网站建设 2026/3/21 3:00:38

Data Agent:基于 LangChain 1.1 的智能数据分析助手

最近在折腾数据分析项目时,发现传统的数据分析流程往往需要反复切换工具:上传数据、写 Python 脚本、生成图表、分析结果。有没有一种方式能让 AI 直接理解数据并执行分析?基于这个需求,我实践了一个基于 LangChain 1.1 的智能数据…

作者头像 李华
网站建设 2026/3/30 14:03:50

仅限内部使用的监控策略:私有化Dify资源观测性实践秘籍

第一章:私有化 Dify 资源监控的背景与意义在企业级 AI 应用快速落地的今天,大模型服务平台 Dify 因其灵活的编排能力和低代码开发体验被广泛采用。然而,当 Dify 部署于私有化环境时,资源使用情况变得复杂且难以统一掌控。服务器 C…

作者头像 李华
网站建设 2026/3/30 22:51:21

打通 C++ 与 Node.js 的跨语言交互通道

这里写自定义目录标题从实际需求出发:为何需要 callJS?核心功能:从注册到调用的完整闭环注册回调:setCallBack 搭建沟通桥梁合理的创建标题,有助于目录的生成同步调用:call 实现即时交互异步调用&#xff1…

作者头像 李华
网站建设 2026/3/29 15:35:04

list类

namespace bite {// List的节点类template<class T>struct ListNode{ListNode(const T& val T()) : _pPre(nullptr), _pNext(nullptr), _val(val){}ListNode<T>* _pPre;ListNode<T>* _pNext;T _val;};//List的迭代器类template<class T, class Ref, …

作者头像 李华