summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_extern.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-03-05 19:52:25 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-03-05 19:52:25 +0000
commit94b35ac8ba6c670755f5c398f89709d960544622 (patch)
tree0c62a6bd55e1b1b55e3b7f5f166d8d94a0c07777 /sys/uvm/uvm_extern.h
parent4939771421161444c79853f0ec2588d8aac2627e (diff)
Make ELF platforms generate ELF core dumps. Somewhat based on code from
NetBSD. ok kurt@, drahn@, miod@
Diffstat (limited to 'sys/uvm/uvm_extern.h')
-rw-r--r--sys/uvm/uvm_extern.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h
index 2ec3f3431da..2e97ced5933 100644
--- a/sys/uvm/uvm_extern.h
+++ b/sys/uvm/uvm_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_extern.h,v 1.73 2009/02/11 11:09:36 mikeb Exp $ */
+/* $OpenBSD: uvm_extern.h,v 1.74 2009/03/05 19:52:24 kettenis Exp $ */
/* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */
/*
@@ -406,6 +406,20 @@ struct vmspace {
#ifdef _KERNEL
/*
+ * used to keep state while iterating over the map for a core dump.
+ */
+struct uvm_coredump_state {
+ void *cookie; /* opaque for the caller */
+ vaddr_t start; /* start of region */
+ vaddr_t realend; /* real end of region */
+ vaddr_t end; /* virtual end of region */
+ vm_prot_t prot; /* protection of region */
+ int flags; /* flags; see below */
+};
+
+#define UVM_COREDUMP_STACK 0x01 /* region is user stack */
+
+/*
* the various kernel maps, owned by MD code
*/
extern struct vm_map *exec_map;
@@ -574,6 +588,10 @@ void uvm_swap_init(void);
/* uvm_unix.c */
int uvm_coredump(struct proc *, struct vnode *,
struct ucred *, struct core *);
+int uvm_coredump_walkmap(struct proc *,
+ void *,
+ int (*)(struct proc *, void *,
+ struct uvm_coredump_state *), void *);
void uvm_grow(struct proc *, vaddr_t);
/* uvm_user.c */