From 4db2c919ef776d30d782b2f43c61e3836cbc7419 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Fri, 26 Sep 2025 23:27:41 +0200 Subject: [PATCH] Nicer printing of frame refcount mismatch --- src/debugger.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/debugger.rs b/src/debugger.rs index a0aff0bc05..f2cf18c1cd 100644 --- a/src/debugger.rs +++ b/src/debugger.rs @@ -153,16 +153,15 @@ pub unsafe fn debugger(target_id: Option<*const ContextLock>, token: &mut CleanL assert!(p); continue; }; - let rc = info.refcount(); - let (c, s) = match rc { - None => (0, false), - Some(RefCount::One) => (1, false), - Some(RefCount::Cow(c)) => (c.get(), false), - Some(RefCount::Shared(s)) => (s.get(), true), + let (c, s) = match info.refcount() { + None => (0, ""), + Some(RefCount::One) => (1, ""), + Some(RefCount::Cow(c)) => (c.get(), " cow"), + Some(RefCount::Shared(s)) => (s.get(), " shared"), }; if c != count { println!( - "frame refcount mismatch for {:?} ({} != {} s {})", + "frame refcount mismatch for {:?} ({} != {}{})", frame, c, count, s ); }