From fed3110ae89ad10c4b980edd82cfb65a0715464b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 9 Sep 2020 10:55:29 -0600 Subject: [PATCH] Better unimplemented messages --- src/allocator/frame/buddy.rs | 2 +- src/allocator/frame/bump.rs | 2 +- src/arch/emulate.rs | 2 +- src/arch/x86_64.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/allocator/frame/buddy.rs b/src/allocator/frame/buddy.rs index 23e9ef54c7..28ccec0695 100644 --- a/src/allocator/frame/buddy.rs +++ b/src/allocator/frame/buddy.rs @@ -190,7 +190,7 @@ impl FrameAllocator for BuddyAllocator { //TODO: improve performance let mut map_phys = entry.map; loop { - if map_phys.data() == 0 { unimplemented!() } + if map_phys.data() == 0 { unimplemented!("map_phys.data() == 0") } let map_virt = A::phys_to_virt(map_phys); if map_page == 0 { let map_byte_virt = map_virt.add(map_bit / 8); diff --git a/src/allocator/frame/bump.rs b/src/allocator/frame/bump.rs index 7f4a2a2243..ebeff49f52 100644 --- a/src/allocator/frame/bump.rs +++ b/src/allocator/frame/bump.rs @@ -54,6 +54,6 @@ impl FrameAllocator for BumpAllocator { } unsafe fn free(&mut self, _address: PhysicalAddress, _count: FrameCount) { - unimplemented!(); + unimplemented!("BumpAllocator::free not implemented"); } } diff --git a/src/arch/emulate.rs b/src/arch/emulate.rs index f8d3f019a3..851684c732 100644 --- a/src/arch/emulate.rs +++ b/src/arch/emulate.rs @@ -228,7 +228,7 @@ impl Machine { } fn invalidate(&mut self, _address: VirtualAddress) { - unimplemented!(); + unimplemented!("EmulateArch::invalidate not implemented"); } //TODO: cleanup diff --git a/src/arch/x86_64.rs b/src/arch/x86_64.rs index f5d3bf084b..c2e2acfbd8 100644 --- a/src/arch/x86_64.rs +++ b/src/arch/x86_64.rs @@ -23,7 +23,7 @@ impl Arch for X8664Arch { const PHYS_OFFSET: usize = Self::PAGE_NEGATIVE_MASK + (Self::PAGE_ADDRESS_SIZE >> 1); // PML4 slot 256 and onwards unsafe fn init() -> &'static [MemoryArea] { - unimplemented!() + unimplemented!("X8664Arch::init unimplemented"); } #[inline(always)]