STATIC void GC_debug_print_heap_obj_proc(ptr_t p) { GC_ASSERT(I_DONT_HOLD_LOCK()); if (GC_HAS_DEBUG_INFO(p)) { GC_print_obj(p); } else { GC_default_print_heap_obj_proc(p); } }
STATIC void GC_print_source_ptr(ptr_t p) { ptr_t base = GC_base(p); if (0 == base) { if (0 == p) { GC_err_printf("in register"); } else { GC_err_printf("in root set"); } } else { GC_err_printf("in object at "); /* FIXME: We can't call the debug version of GC_print_heap_obj */ /* (with PRINT_CALL_CHAIN) here because the lock is held and */ /* the world is stopped. */ GC_default_print_heap_obj_proc(base); } }