From 6d6796c294ca6e9b7f83c295217817c4bf486031 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 28 Oct 2011 23:54:47 +0000 Subject: Add debugging message upon libltdl dlopen() failure This greatly simplifies debugging TDE dynamically loaded plugins! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1261212 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ltdl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ltdl.c b/ltdl.c index 4342bf9..d105ce5 100644 --- a/ltdl.c +++ b/ltdl.c @@ -616,6 +616,10 @@ sys_dl_open (loader_data, filename) if (!module) { + char *error; + if ((error = dlerror()) != NULL) { + printf ("The Trinity ltdl loader was unable to dlopen() the shared library '%s' : '%s'\n\r", filename, error); + } MUTEX_SETERROR (DLERROR (CANNOT_OPEN)); } -- cgit v1.2.1