summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vm/vm_map.c1
-rw-r--r--vm/vm_map.h3
-rw-r--r--vm/vm_object.c1
-rw-r--r--vm/vm_object.h2
-rw-r--r--vm/vm_print.h22
-rw-r--r--vm/vm_resident.c1
6 files changed, 25 insertions, 5 deletions
diff --git a/vm/vm_map.c b/vm/vm_map.c
index 47db118..2be7147 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -55,6 +55,7 @@
#if MACH_KDB
#include <ddb/db_output.h>
+#include <vm/vm_print.h>
#endif /* MACH_KDB */
diff --git a/vm/vm_map.h b/vm/vm_map.h
index a15e681..5fdac4e 100644
--- a/vm/vm_map.h
+++ b/vm/vm_map.h
@@ -397,9 +397,6 @@ extern kern_return_t vm_map_protect(vm_map_t, vm_offset_t, vm_offset_t,
extern kern_return_t vm_map_inherit(vm_map_t, vm_offset_t, vm_offset_t,
vm_inherit_t);
-/* Debugging: print a map */
-extern void vm_map_print(vm_map_t);
-
/* Look up an address */
extern kern_return_t vm_map_lookup(vm_map_t *, vm_offset_t, vm_prot_t,
vm_map_version_t *, vm_object_t *,
diff --git a/vm/vm_object.c b/vm/vm_object.c
index d83c39f..18a909f 100644
--- a/vm/vm_object.c
+++ b/vm/vm_object.c
@@ -2969,6 +2969,7 @@ vm_object_page_map(
#if MACH_KDB
+#include <vm/vm_print.h>
#define printf kdbprintf
boolean_t vm_object_print_pages = FALSE;
diff --git a/vm/vm_object.h b/vm/vm_object.h
index 4e4c949..adeff65 100644
--- a/vm/vm_object.h
+++ b/vm/vm_object.h
@@ -233,8 +233,6 @@ extern void vm_object_page_map(
vm_offset_t (*)(void *, vm_offset_t),
void *);
-extern void vm_object_print(vm_object_t);
-
extern vm_object_t vm_object_request_object(struct ipc_port *);
extern boolean_t vm_object_coalesce(
diff --git a/vm/vm_print.h b/vm/vm_print.h
new file mode 100644
index 0000000..69a20ba
--- /dev/null
+++ b/vm/vm_print.h
@@ -0,0 +1,22 @@
+#ifndef VM_PRINT_H
+#define VM_PRINT_H
+
+#include <vm/vm_map.h>
+#include <machine/db_machdep.h>
+
+/* Debugging: print a map */
+extern void vm_map_print(vm_map_t);
+
+/* Pretty-print a copy object for ddb. */
+extern void vm_map_copy_print(vm_map_copy_t);
+
+#include <vm/vm_object.h>
+
+extern void vm_object_print(vm_object_t);
+
+#include <vm/vm_page.h>
+
+extern void vm_page_print(vm_page_t);
+
+#endif /* VM_PRINT_H */
+
diff --git a/vm/vm_resident.c b/vm/vm_resident.c
index d2edf5a..7906b58 100644
--- a/vm/vm_resident.c
+++ b/vm/vm_resident.c
@@ -60,6 +60,7 @@
#if MACH_KDB
#include <ddb/db_output.h>
+#include <vm/vm_print.h>
#endif /* MACH_KDB */