From f9e95e8372cd62db4805feb30b74223b8db5444b Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Tue, 29 Dec 2015 03:26:05 +0100 Subject: Improve VM map debugging * vm/vm_map.c (vm_map_print): Update arguments to conform to ddb protocol. * vm/vm_print.h (vm_map_print): Likewise for prototype. --- vm/vm_map.c | 8 +++++++- vm/vm_print.h | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/vm/vm_map.c b/vm/vm_map.c index 26aa731..2cb0a29 100644 --- a/vm/vm_map.c +++ b/vm/vm_map.c @@ -4719,10 +4719,16 @@ kern_return_t vm_map_machine_attribute( /* * vm_map_print: [ debug ] */ -void vm_map_print(vm_map_t map) +void vm_map_print(db_expr_t addr, boolean_t have_addr, db_expr_t count, const char *modif) { + vm_map_t map; vm_map_entry_t entry; + if (!have_addr) + map = current_thread()->task->map; + else + map = (vm_map_t)addr; + iprintf("Task map 0x%X: pmap=0x%X,", (vm_offset_t) map, (vm_offset_t) (map->pmap)); printf("ref=%d,nentries=%d,", map->ref_count, map->hdr.nentries); diff --git a/vm/vm_print.h b/vm/vm_print.h index eab534e..8a36d75 100644 --- a/vm/vm_print.h +++ b/vm/vm_print.h @@ -23,7 +23,8 @@ #include /* Debugging: print a map */ -extern void vm_map_print(vm_map_t); +extern void vm_map_print(db_expr_t addr, boolean_t have_addr, + db_expr_t count, const char *modif); /* Pretty-print a copy object for ddb. */ extern void vm_map_copy_print(const vm_map_copy_t); -- cgit v1.2.3