In the fault handler, record growth of the stack, so that core dumps

actually contain the entire stack.
This commit is contained in:
nathanw 2002-09-21 00:29:04 +00:00
parent 914a9c522b
commit 2cab03d64a
1 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fault.c,v 1.22 2002/08/14 21:52:36 briggs Exp $ */
/* $NetBSD: fault.c,v 1.23 2002/09/21 00:29:04 nathanw Exp $ */
/*
* Copyright (c) 1994-1997 Mark Brinicombe.
@ -47,7 +47,7 @@
#include "opt_pmap_debug.h"
#include <sys/types.h>
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.22 2002/08/14 21:52:36 briggs Exp $");
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.23 2002/09/21 00:29:04 nathanw Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -513,9 +513,11 @@ copyfault:
pcb->pcb_onfault = NULL;
rv = uvm_fault(map, va, 0, ftype);
pcb->pcb_onfault = onfault;
if (rv == 0)
if (rv == 0) {
if (user != 0) /* Record any stack growth... */
uvm_grow(p, trunc_page(va));
goto out;
}
if (user == 0) {
if (pcb->pcb_onfault) {
frame->tf_r0 = rv;