summaryrefslogtreecommitdiffstats
path: root/src/debug.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-12 19:50:07 +0100
committerGravatar Martin Szulecki2010-01-12 19:50:07 +0100
commit3e6af058ebce582c43af16450c9719fbe2cb65cb (patch)
treec47f4d12ac80c714a103e5a7129fcea315e3af09 /src/debug.c
parent04e1f74afe0efe4d09affed9b9fee08847b78ab9 (diff)
downloadlibimobiledevice-3e6af058ebce582c43af16450c9719fbe2cb65cb.tar.gz
libimobiledevice-3e6af058ebce582c43af16450c9719fbe2cb65cb.tar.bz2
Add debug function to print a plist
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/debug.c b/src/debug.c
index cf93e01..8912b3a 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -134,3 +134,16 @@ inline void debug_buffer_to_file(const char *file, const char *data, const int l
}
#endif
}
+
+inline void debug_plist(plist_t plist)
+{
+ if (!plist)
+ return;
+
+ char *buffer = NULL;
+ uint32_t length = 0;
+ plist_to_xml(plist, &buffer, &length);
+ debug_info("plist size: %i\nbuffer :\n%s", length, buffer);
+ free(buffer);
+}
+