提交 880d3e09 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

print regs on crash

上级 7cd9360d
......@@ -90,6 +90,14 @@ trap(struct trapframe *tf)
// In kernel, it must be our mistake.
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
tf->trapno, cpu->id, tf->eip, rcr2());
cprintf("eax %x\n", tf->eax);
cprintf("ebx %x\n", tf->ebx);
cprintf("ecx %x\n", tf->ecx);
cprintf("edx %x\n", tf->edx);
cprintf("edi %x\n", tf->edi);
cprintf("esi %x\n", tf->esi);
cprintf("esp %x\n", tf->esp);
cprintf("ebp %x\n", tf->ebp);
panic("trap");
}
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论