当前位置: 技术问答>linux和unix
OS 内核调试错误
来源: 互联网 发布时间:2016-11-29
本文导语: 我调试内核时,系统初始化后将任务从内核态转移到用户态时,是用的是IRETD,(先把用户态的EIP,CS,EFLAGS,ESP,SS压入栈,在用IRETD指令)跳转后发现已经调到指定地址,各个寄存器的值也正确,但执行跳转后的第...
我调试内核时,系统初始化后将任务从内核态转移到用户态时,是用的是IRETD,(先把用户态的EIP,CS,EFLAGS,ESP,SS压入栈,在用IRETD指令)跳转后发现已经调到指定地址,各个寄存器的值也正确,但执行跳转后的第一条指令时(PUSH EBP),出现错误,显示为
00038046419e[CPU0 ] exception(): 3rd (14) exception with no resolution, shutdown status is 00h, resetting
我有开启了BOCHS的TRACE ON,又调试了一编,详细错误是
CPU 0: Interrupt 0x20 occured (error_code=0x0000)
CPU 0: Exception 0x0e - (#PF) page fault occured (error_code=0x0002)
CPU 0: Interrupt 0x0e occured (error_code=0x0002)
CPU 0: Exception 0x0e - (#PF) page fault occured (error_code=0x0002)
CPU 0: Exception 0x08 - (#DF) double fault occured (error_code=0x0000)
CPU 0: Interrupt 0x08 occured (error_code=0x0000)
CPU 0: Exception 0x0e - (#PF) page fault occured (error_code=0x0002)
00038046419i[CPU0 ] CPU is in protected mode (active)
刚开始,我以为是堆栈溢出了,于是检查了SS 和ESP发现都正确,实在没辙了,望大家给点意见,不胜感激!!
00038046419e[CPU0 ] exception(): 3rd (14) exception with no resolution, shutdown status is 00h, resetting
我有开启了BOCHS的TRACE ON,又调试了一编,详细错误是
CPU 0: Interrupt 0x20 occured (error_code=0x0000)
CPU 0: Exception 0x0e - (#PF) page fault occured (error_code=0x0002)
CPU 0: Interrupt 0x0e occured (error_code=0x0002)
CPU 0: Exception 0x0e - (#PF) page fault occured (error_code=0x0002)
CPU 0: Exception 0x08 - (#DF) double fault occured (error_code=0x0000)
CPU 0: Interrupt 0x08 occured (error_code=0x0000)
CPU 0: Exception 0x0e - (#PF) page fault occured (error_code=0x0002)
00038046419i[CPU0 ] CPU is in protected mode (active)
刚开始,我以为是堆栈溢出了,于是检查了SS 和ESP发现都正确,实在没辙了,望大家给点意见,不胜感激!!
|
页故障发生了,也就是说返回的虚拟地址是正确的,但是并没有将对应的物理页,即没有指令可以获取!!
可能是你的页表初始化有问题
可能是你的页表初始化有问题
|
zhichiyig