[vlc-devel] commit: objects: Export vlc_object_dump() to debug. (Pierre d'Herbemont )

git version control git at videolan.org
Sun Mar 30 01:36:37 CET 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sat Mar 29 22:31:36 2008 +0100| [ab121fdf60054b81c9354ad5e42854ba2a5aeb52]

objects: Export vlc_object_dump() to debug.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ab121fdf60054b81c9354ad5e42854ba2a5aeb52
---

 include/vlc_objects.h |    6 ++++++
 src/libvlc.sym        |    1 +
 src/misc/objects.c    |   10 ++++++++++
 3 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/vlc_objects.h b/include/vlc_objects.h
index 9204be4..196a41b 100644
--- a/include/vlc_objects.h
+++ b/include/vlc_objects.h
@@ -113,6 +113,9 @@ VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
 VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) );
 VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
 
+/* __vlc_object_dump */
+VLC_EXPORT( void, __vlc_object_dump, ( vlc_object_t *p_this ) );
+
 /*}@*/
 
 #define vlc_object_create(a,b) \
@@ -142,6 +145,9 @@ VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
 #define vlc_list_find(a,b,c) \
     __vlc_list_find( VLC_OBJECT(a),b,c)
 
+#define vlc_object_dump(a) \
+    __vlc_object_dump( VLC_OBJECT(a))
+
 
 /* Objects and threading */
 VLC_EXPORT( void, __vlc_object_lock, ( vlc_object_t * ) );
diff --git a/src/libvlc.sym b/src/libvlc.sym
index 634b311..541ddcb 100644
--- a/src/libvlc.sym
+++ b/src/libvlc.sym
@@ -412,6 +412,7 @@ __vlc_object_alive
 __vlc_object_attach
 __vlc_object_create
 __vlc_object_detach
+__vlc_object_dump
 __vlc_object_find
 __vlc_object_find_name
 vlc_object_get
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 6d4d867..ffb3a57 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -1228,6 +1228,16 @@ void vlc_list_release( vlc_list_t *p_list )
     free( p_list );
 }
 
+/*****************************************************************************
+ * dump an object. (Debug function)
+ *****************************************************************************/
+void __vlc_object_dump( vlc_object_t *p_this )
+{
+    vlc_mutex_lock( &structure_lock );
+    PrintObject( p_this, "vlc_object_dump: " );
+    vlc_mutex_unlock( &structure_lock );
+}
+
 /* Following functions are local */
 
 /*****************************************************************************




More information about the vlc-devel mailing list