Initial commit for core dump.

We can create a dummy core file when gpe occurs.
	modified:   executer/kernel/mcctrl.h
	modified:   executer/kernel/syscall.c
	modified:   kernel/include/syscall.h
	modified:   kernel/mem.c
This commit is contained in:
Naoki Hamada
2014-07-01 16:03:11 +09:00
parent dc7f38c8c7
commit 83ced89fa3
4 changed files with 54 additions and 1 deletions

View File

@ -206,6 +206,23 @@ static void unhandled_page_fault(struct process *proc, void *fault_addr, void *r
/* TODO */
ihk_mc_debug_show_interrupt_context(regs);
{
/* xxx */
/* core dump framework test */
struct syscall_request request IHK_DMA_ALIGN;
int ret;
request.number = __NR_coredump;
/* no data for now */
ret = do_syscall(&request, proc->uctx,
proc->cpu_id, proc->pid);
if (ret == 0) {
kprintf("dumped core.\n");
} else {
kprintf("core dump failed.\n");
}
}
#ifdef DEBUG_PRINT_MEM
{
uint64_t *sp = (void *)REGS_GET_STACK_POINTER(regs);