- /* The parent of an object normally holds the unique reference.
- * As not all objects are threads, it could also be an ancestor. */
- vlc_mutex_lock (&structure_lock);
- for (vlc_object_t *cur = obj; cur != NULL; cur = cur->p_parent)
- if (cur == caller)
- {
- vlc_mutex_unlock (&structure_lock);
- return;
- }
- vlc_mutex_unlock (&structure_lock);
-
-#if 1
- if (caller->i_object_type == VLC_OBJECT_PLAYLIST)
- return; /* Playlist is too clever, or hopelessly broken. */
+ fprintf (stderr, "The %s %s thread object is accessing...\n"
+ "the %s %s object in a suspicous manner.\n",
+ caller && caller->psz_object_name
+ ? caller->psz_object_name : "unnamed",
+ caller ? caller->psz_object_type : "main",
+ obj->psz_object_name ? obj->psz_object_name : "unnamed",
+ obj->psz_object_type);
+ fflush (stderr);
+
+#ifdef __GLIBC__
+ void *stack[20];
+ int stackdepth = backtrace (stack, sizeof (stack) / sizeof (stack[0]));
+ backtrace_symbols_fd (stack, stackdepth, 2);