能力值:
( LV2,RANK:10 )
|
-
-
|
能力值:
( LV2,RANK:10 )
|
-
-
[已解决]OLLYDBG的段寄存器问题
通过这个再去学80386的内存寻址好象很不错,呵呵.
FS:[0] =003B:[0]
然后通过003B=0000 0000 0011 1101
可以判断是在GDT还是LDT中(第2位,此处为1,即GDT),
如果是GDT,就通过GDT基址加索引,在GDTR中寻找段描述符(通过高12位,这里是0000 0000 0011,索引即为3),段描述符包含段的基址、限长、优先级等各种属性,这就得到了段的起始地址,然后段的基址加偏移地址(这里就是0)就得到了线性地址(这里是7FFDF000吧),然后再去找物理地址(这个我完全弄明白了才敢说)
如果第2位是0,这表示段描述符在LDT中,这时第一步的操作还是从GDTR寄存器中获取GDT的基址,并且要从LDTR中获取LDT所在段的位置索引;然后以这个位置索引在GDT中得到LDT段的位置,然后才是用索引(这里是3)从LDT段中获得段描述符,再以这个段描述符得到段的基址等信息。再以基址加上偏移地址(这里是0)才得到最后的线性地址。
高手都不愿意说的问题,像我等菜鸟要琢磨很久的.虽然有好资料,但是用实例说明我想更有利于理解.如有错,还望指点.
|