User-Mode下如何得到线程的Stack地址范围

WinDbg

User-Mode下如何得到线程的Stack地址范围


Thomson 2009-09-16, 00:12 上午
在windbg debug的时候,手动解析stack的话,需要知道这个thread的stack 范围,这个可以怎么得到?
不知道在teb里面有没有,我粗略search了一下,没找到.

Re: User-Mode下如何得到线程的Stack地址范围


benlong 2009-09-16, 09:56 上午
KTHREAD里有
+0x018 InitialStack : Ptr32 Void
+0x01c StackLimit : Ptr32 Void
+0x028 KernelStack : Ptr32 Void

Re: User-Mode下如何得到线程的Stack地址范围


格蠹老雷 2009-09-16, 10:20 上午
用户会话中,!teb可以呀
0:001> !teb
TEB at 7ffdc000
ExceptionList: 00bfffe4
StackBase: 00c00000
StackLimit: 00bff000
当前栈指针,看ESP。

Re: User-Mode下如何得到线程的Stack地址范围


Thomson 2009-09-16, 15:13 下午
谢谢张老师,我用dt _TEB找了一下,没找到,还是!teb好用.

Powered by Community Server Powered by CnForums.Net