fix coredump (ltp abort01)

This commit is contained in:
Tomoki Shirasawa
2014-09-03 10:56:41 +09:00
parent 34854d3c93
commit 7b825c0a65
3 changed files with 32 additions and 13 deletions

View File

@ -180,7 +180,7 @@ void freecore(struct coretable **);
* \param regs A pointer to a x86_regs structure.
*/
static void coredump(struct process *proc, void *regs)
void coredump(struct process *proc, void *regs)
{
struct syscall_request request IHK_DMA_ALIGN;
int ret;
@ -216,9 +216,9 @@ static void unhandled_page_fault(struct process *proc, void *fault_addr, void *r
unsigned long error = ((struct x86_regs *)regs)->error;
irqflags = kprintf_lock();
__kprintf("[%d] Page fault for 0x%lX\n",
dkprintf("[%d] Page fault for 0x%lX\n",
ihk_mc_get_processor_id(), address);
__kprintf("%s for %s access in %s mode (reserved bit %s set), "
dkprintf("%s for %s access in %s mode (reserved bit %s set), "
"it %s an instruction fetch\n",
(error & PF_PROT ? "protection fault" : "no page found"),
(error & PF_WRITE ? "write" : "read"),
@ -230,14 +230,14 @@ static void unhandled_page_fault(struct process *proc, void *fault_addr, void *r
list_for_each_entry(range, &vm->vm_range_list, list) {
if (range->start <= address && range->end > address) {
found = 1;
__kprintf("address is in range, flag: 0x%X! \n",
dkprintf("address is in range, flag: 0x%X! \n",
range->flag);
ihk_mc_pt_print_pte(vm->page_table, (void*)address);
break;
}
}
if (!found) {
__kprintf("address is out of range! \n");
dkprintf("address is out of range! \n");
}
kprintf_unlock(irqflags);
@ -246,8 +246,8 @@ static void unhandled_page_fault(struct process *proc, void *fault_addr, void *r
ihk_mc_debug_show_interrupt_context(regs);
dkprintf("now dump a core file\n");
coredump(proc, regs);
//dkprintf("now dump a core file\n");
//coredump(proc, regs);
#ifdef DEBUG_PRINT_MEM
{

View File

@ -400,7 +400,7 @@ terminate(int rc, int sig, ihk_mc_user_context_t *ctx)
struct fork_tree_node *child, *next;
request.number = __NR_exit_group;
request.args[0] = ((rc & 0x00ff) << 8) | (sig & 0x7f);
request.args[0] = ((rc & 0x00ff) << 8) | (sig & 0xff);
#ifdef DCFA_KMOD
do_mod_exit(rc);
@ -430,7 +430,7 @@ terminate(int rc, int sig, ihk_mc_user_context_t *ctx)
ihk_mc_spinlock_lock_noirq(&ftn->lock);
ftn->pid = proc->pid;
ftn->exit_status = ((rc & 0x00ff) << 8) | (sig & 0x7f);
ftn->exit_status = ((rc & 0x00ff) << 8) | (sig & 0xff);
ftn->status = PS_ZOMBIE;
ihk_mc_spinlock_unlock_noirq(&ftn->lock);