码迷,mamicode.com
首页 > 编程语言 > 详细

获取内核当前执行模块和当前发生异常地址和线程异常Handler调用步骤

时间:2016-06-10 21:35:48      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:

循环每个内核模块 统计模块大小 判断触发异常的地址属于那个模块。来确定模块

获取发生异常地址
nt!_EXCEPTION_RECORD
+0x000 ExceptionCode : -2139160568
+0x004 ExceptionFlags : 0x807fa938
+0x008 ExceptionRecord : 0x00010000 _EXCEPTION_RECORD
+0x00c ExceptionAddress : 0x807fa340
+0x010 NumberParameters : 0
+0x014 ExceptionInformation : [15] 0x807fa8e4
ExceptionFlags 的地址 +4 就是异常发生地址

call nt!RtlIsValidHandler (840c996a) 这里判断handler是否有效
kd> p
nt!RtlDispatchException+0x76:
840c985c 84c0 test al,al
kd> p
nt!RtlDispatchException+0x78:
840c985e 0f84f0000000 je nt!RtlDispatchException+0x16e (840c9954) 无效就会跳转。有效就不会。应该就是这里报出了异常

获取内核当前执行模块和当前发生异常地址和线程异常Handler调用步骤

标签:

原文地址:http://www.cnblogs.com/kuangke/p/5574204.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!