rem: dprintf(" area 0x%lx: ", area->id); dprintf("base_addr = 0x%lx ", area->base); dprintf("size = 0x%lx ", area->size); dprintf("name = '%s' ", area->name); dprintf("protection = 0x%lx\n", area->protection);
add: kprintf(" area 0x%lx: ", area->id); kprintf("base_addr = 0x%lx ", area->base); kprintf("size = 0x%lx ", area->size); kprintf("name = '%s' ", area->name); kprintf("protection = 0x%lx\n", area->protection);
context: dump_cache_ref(int argc, char **argv){	addr_t address;	vm_area *area;	vm_cache_ref *cache_ref;	if (argc < 2) {		dprintf("cache_ref: not enough arguments\n");		return 0;	}	if (strlen(argv[1]) < 2 || argv[1][0] != '0' || argv[1][1] != 'x') {		dprintf("cache_ref: invalid argument, pass address\n");		return 0;	}	address = atoul(argv[1]);	cache_ref = (vm_cache_ref *)address;	dprintf("cache_ref at %p:\n", cache_ref);	dprintf("cache: %p\n", cache_ref->cache);	dprintf("lock.holder: %ld\n", cache_ref->lock.holder);	dprintf("lock.sem: 0x%lx\n", cache_ref->lock.sem);	dprintf("areas:\n");	for (area = cache_ref->areas; area != NULL; area = area->cache_next) {		dprintf(" area 0x%lx: ", area->id);		dprintf("base_addr = 0x%lx ", area->base);		dprintf("size = 0x%lx ", area->size);		dprintf("name = '%s' ", area->name);		dprintf("protection = 0x%lx\n", area->protection);	}	dprintf("ref_count: %ld\n", cache_ref->ref_count);	return 0;}