When in the kernel debugger we do now record the relevant information

(fault address, pc, read/write) when a page fault occurs, and print them
in case this caused the termination of a debugger command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26949 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-08-12 17:09:42 +00:00
parent 3b99126c1e
commit 46ec230162
4 changed files with 69 additions and 24 deletions
+12 -1
View File
@@ -299,8 +299,19 @@ error:
INVOKE_COMMAND_FAULT);
case INVOKE_COMMAND_FAULT:
kprintf_unfiltered("\n[*** READ/WRITE FAULT ***]\n");
{
debug_page_fault_info* info = debug_get_page_fault_info();
if ((info->flags & DEBUG_PAGE_FAULT_NO_INFO) == 0) {
kprintf_unfiltered("\n[*** %s FAULT at %#lx, pc: %#lx ***]\n",
(info->flags & DEBUG_PAGE_FAULT_NO_INFO) != 0
? "WRITE" : "READ",
info->fault_address, info->pc);
} else {
kprintf_unfiltered("\n[*** READ/WRITE FAULT (?), "
"pc: %#lx ***]\n", info->pc);
}
break;
}
case INVOKE_COMMAND_ERROR:
// command aborted (no page fault)
break;