Re: 请问错误提示"No code found, aborting"出现原因?

Windows内核调试

请问错误提示"No code found, aborting"出现原因?


merry 2009-05-29, 01:35 上午

通过命令kd>  x win32k!*,可以看到如下一行:

  bf934ffe win32k!NtGdiAbortDoc = <no type information>

但是,如果通过如下指令查看,却得到如下错误提示:

 kd> uf bf934ffe
   No code found, aborting
kd> u bf934ffe
win32k!NtGdiAbortDoc:
bf934ffe ??              ???
             ^ Memory access error in 'u bf934ffe'

另外,有一些win32k中的函数是可以通过uf 和 u 查看的。

Q:请问一下出现这个错误提示的原因,谢谢!

Re: 请问错误提示"No code found, aborting"出现原因?


格蠹老雷 2009-05-29, 11:05 上午
简单回答,原因就是调试器在读取要反汇编的内存数据时失败了,也就是读不到要反汇编的机器码。No code found——找不到代码,只好aborting——终止。
更进一步的原因可能是:
1)如果是在分析转储文件,那么可能是WinDBG无法加载到合适版本的映像文件——win32k.sys
2)如果是在做活动内核调试,那么可能要读的内容不在物理内存中,也可能是页表已经混乱

Re: 请问错误提示"No code found, aborting"出现原因?


merry 2009-05-29, 11:51 上午

Host OS:winxp sp2

Guest OS:winxp sp2 (VMware)

我是在内核调试时,发现这个问题的,今天又重新试了一下,发现问题依然存在:x win32k!*时有很多输出结果。但uf一些函数可以正常输出,但是一些函数不能够反汇编(例如:win32k!NtGdiAbortDoc ),提示错误:No code found, aborting

我看到你的回复:

 "那么可能要读的内容不在物理内存中,也可能是页表已经混乱 "

请问能否将具体的解决方法说明一下,谢谢!

Re: 请问错误提示"No code found, aborting"出现原因?


格蠹老雷 2009-05-29, 13:31 下午
可以尝试执行.pagein命令,注意:
After you run the .pagein command, you must use the g (Go) command to resume program execution. After a brief time, the target computer automatically breaks into the debugger again.

Re: 请问错误提示"No code found, aborting"出现原因?


merry 2009-05-29, 18:18 下午

问题依然存在,我再想一想...

kd> .pagein bf934ffe
Pagein operations are only supported for user mode addresses due to limitations in the memory manager
kd> .pagein /f bf934ffe
You need to continue execution (press 'g' <enter>) for the pagein to be brought in.  When the debugger breaks in again, the page will be present.
kd> g
Break instruction exception - code 80000003 (first chance)
nt!RtlpBreakWithStatusInstruction:
80526da8 cc              int     3
kd> uf bf934ffe
No code found, aborting

Re: 请问错误提示"No code found, aborting"出现原因?


llx 2009-05-31, 09:08 上午
好像是win32k的地址,不是在所有进程都有的。需要切换到有UI线程的进程才可以。用.process切换一下应该就可以了。

Re: 请问错误提示"No code found, aborting"出现原因?


王宇 2009-05-31, 09:46 上午
http://advdbg.org/forums/2031/ShowPost.aspx

Re: 请问错误提示"No code found, aborting"出现原因?


格蠹老雷 2009-05-31, 12:26 下午

很赞成LLX和王宇,这是王宇在2031那个帖子中的话:

那是因为 w32k.sys 是 GDI 相关的,而 System 进程没有自己的用户态空间。类似的还有 Idel 进程。不信你切换过去试试~

很多时候内核调试中断下来时,是在IDLE进程,所以无法读取Win32K的内容,应该切换到其它进程再观察。

Powered by Community Server Powered by CnForums.Net