Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys PT_DUMPCORE support.



details:   https://anonhg.NetBSD.org/src/rev/af975474bdb2
branches:  trunk
changeset: 542193:af975474bdb2
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jan 23 17:35:18 2003 +0000

description:
PT_DUMPCORE support.

diffstat:

 sys/kern/sys_process.c |  8 ++++++--
 sys/sys/ptrace.h       |  3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r ee895a07a04a -r af975474bdb2 sys/kern/sys_process.c
--- a/sys/kern/sys_process.c    Thu Jan 23 17:34:49 2003 +0000
+++ b/sys/kern/sys_process.c    Thu Jan 23 17:35:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_process.c,v 1.78 2003/01/18 10:06:34 thorpej Exp $ */
+/*     $NetBSD: sys_process.c,v 1.79 2003/01/23 17:35:32 christos Exp $        */
 
 /*-
  * Copyright (c) 1993 Jan-Simon Pendry.
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.78 2003/01/18 10:06:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.79 2003/01/23 17:35:32 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -125,6 +125,7 @@
                break;
 
        case  PT_ATTACH:
+       case  PT_DUMPCORE:
                /*
                 * You can't attach to a process if:
                 *      (1) it's the process that's doing the attaching,
@@ -314,6 +315,9 @@
                (void) copyout(&piod, SCARG(uap, addr), sizeof(piod));
                return (error);
 
+       case  PT_DUMPCORE:
+               return coredump(lt);
+
 #ifdef PT_STEP
        case  PT_STEP:
                /*
diff -r ee895a07a04a -r af975474bdb2 sys/sys/ptrace.h
--- a/sys/sys/ptrace.h  Thu Jan 23 17:34:49 2003 +0000
+++ b/sys/sys/ptrace.h  Thu Jan 23 17:35:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptrace.h,v 1.26 2003/01/18 09:53:20 thorpej Exp $      */
+/*     $NetBSD: ptrace.h,v 1.27 2003/01/23 17:35:18 christos Exp $     */
 
 /*-
  * Copyright (c) 1984, 1993
@@ -48,6 +48,7 @@
 #define        PT_ATTACH       9       /* attach to running process */
 #define        PT_DETACH       10      /* detach from running process */
 #define        PT_IO           11      /* do I/O to/from the stopped process */
+#define        PT_DUMPCORE     12      /* make the child generate a core dump */
 
 #define        PT_FIRSTMACH    32      /* for machine-specific requests */
 #include <machine/ptrace.h>    /* machine-specific requests, if any */



Home | Main Index | Thread Index | Old Index