diff options
author | Richard Braun <rbraun@sceen.net> | 2015-12-29 03:26:05 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2015-12-29 03:26:05 +0100 |
commit | f9e95e8372cd62db4805feb30b74223b8db5444b (patch) | |
tree | 6d9462c53c520e88a0717afb20c506e66ecf0ed1 | |
parent | cd6fbe68303d292a950281038a3062c1b4e9aa11 (diff) |
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.
-rw-r--r-- | vm/vm_map.c | 8 | ||||
-rw-r--r-- | 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 <machine/db_machdep.h> /* 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); |