cpu状态信息结束
spyinterrupt()调用的spysegment()、spyselector()函数已经在列表4-5和列表4-16中给出。spygateoffset()位于列表4-18的末尾,它的工作和spydescriptorbase()、spydescriptorlimit()类似,从x86_gate结构中取出offset1和offset2位域,并适当的组织它们以构成一个32位地址。spyidtgaet()定义于列表4-19。它与spydescriptor()十分类似。汇编指令sidt存储一个48位的值,该值就是cpu的idt寄存器的内容,它由一个16位的表大小限制值和idt的32位线性基地址构成。列表4-19中的剩余代码将选择器的描述符索引和idt的大小限制值进行比较,如果ok,则对应的中断描述符将被复制到调用者提供的x86_gate结构中。否则,门结构的所有成员都将被设置为0。
bool spyidtgate (px86_selector pselector,
px86_gate pgate)
{
x86_table idt;
px86_gate pgates = null;
bool fok = false;
if (pgate != null)
首页
上页
下页
尾页
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
[26]
[27]
[28]
[29]
[30]
[31]
[32]
[33]
[34]
[35]
[36]
[37]
[38]
[39]
本文关键:《Undocumented Windows 2000 Secrets》翻译 --- 第四章(5)