VMKernelAddressSpace: Let Dump() print all ranges.

This makes the output of the aspace KDL command more useful as it shows
reserved and free ranges in addition to areas.

Change-Id: Id6353820b7c040fce6bfc3297c1b34adb1c9bb99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2846
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Michael Lotz
2020-08-01 19:23:27 +00:00
committed by waddlesplash
parent 2555f33549
commit 7d432fc911
+25 -9
View File
@@ -482,19 +482,35 @@ VMKernelAddressSpace::Dump() const
{
VMAddressSpace::Dump();
kprintf("area_list:\n");
kprintf("range list:\n");
for (RangeList::ConstIterator it = fRangeList.GetIterator();
Range* range = it.Next();) {
if (range->type != Range::RANGE_AREA)
continue;
VMKernelArea* area = range->area;
kprintf(" area %" B_PRId32 ": ", area->id);
kprintf("base_addr = %#" B_PRIxADDR " ", area->Base());
kprintf("size = %#" B_PRIxSIZE " ", area->Size());
kprintf("name = '%s' ", area->name);
kprintf("protection = %#" B_PRIx32 "\n", area->protection);
switch (range->type) {
case Range::RANGE_AREA:
{
VMKernelArea* area = range->area;
kprintf(" area %" B_PRId32 ": ", area->id);
kprintf("base_addr = %#" B_PRIxADDR " ", area->Base());
kprintf("size = %#" B_PRIxSIZE " ", area->Size());
kprintf("name = '%s' ", area->name);
kprintf("protection = %#" B_PRIx32 "\n", area->protection);
break;
}
case Range::RANGE_RESERVED:
kprintf(" reserved: base_addr = %#" B_PRIxADDR
" reserved_base = %#" B_PRIxADDR " size = %#"
B_PRIxSIZE " flags = %#" B_PRIx32 "\n", range->base,
range->reserved.base, range->size, range->reserved.flags);
break;
case Range::RANGE_FREE:
kprintf(" free: base_addr = %#" B_PRIxADDR " size = %#"
B_PRIxSIZE "\n", range->base, range->size);
break;
}
}
}