From 753e00661139fc4881b36099a9b0097d2d761edf Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 18 Sep 2018 15:55:39 -0400 Subject: [PATCH] kernel: Include the area name and ID in the "attempting to clone" panic message. Change-Id: Iecc842047929531f8feb7304fbcd1a8f2b28ab2f Reviewed-on: https://review.haiku-os.org/584 Reviewed-by: waddlesplash --- src/system/kernel/vm/vm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 8152e09fad..6176bd75a6 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -2107,8 +2107,9 @@ vm_clone_area(team_id team, const char* name, void** address, && !(sourceArea->protection & B_USER_CLONEABLE_AREA)) { // kernel areas must not be cloned in userland, unless explicitly // declared user-cloneable upon construction -#if KDEBUG_LEVEL_2 - panic("attempting to clone non-user-cloneable kernel area!"); +#if KDEBUG + panic("attempting to clone kernel area \"%s\" (%" B_PRId32 ")!", + sourceArea->name, sourceID); #endif status = B_NOT_ALLOWED; } else if (sourceArea->cache_type == CACHE_TYPE_NULL) {