From: Tae-Jeong Lee Date: Mon, 26 Aug 2013 14:03:57 +0000 (+0900) Subject: Added logs to help debugging regarding dynamic linking loader error. X-Git-Tag: 2.2.1_release~10^2~46^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9dfaf42a70cdd4378bb0636b5ae8c41e6d9725f4;p=framework%2Fweb%2Fwrt-installer.git Added logs to help debugging regarding dynamic linking loader error. [Issue#] N/A [Problem] When a dependency error occured during wrt-plugins installation, the dynamic linking loader works strangely after that. Because of that, to help debugging, some logs were added. [Cause] N/A [Solution] Added some 'stderr' logs regarding dynamic linking loader error. It will show the reason of fail to dlopen(). Change-Id: I964db7d7434274549197d79655cf7eea50884ea7 --- diff --git a/src/jobs/plugin_install/plugin_install_task.cpp b/src/jobs/plugin_install/plugin_install_task.cpp index 2b90704..097f9ac 100644 --- a/src/jobs/plugin_install/plugin_install_task.cpp +++ b/src/jobs/plugin_install/plugin_install_task.cpp @@ -176,15 +176,22 @@ void PluginInstallTask::stepLoadPluginLibrary() LogDebug("Loading plugin: " << filename.Filename()); + fprintf(stderr, " - Try to dlopen() : [%s] ", filename.Fullpath().c_str()); + void *dlHandle = dlopen(filename.Fullpath().c_str(), RTLD_LAZY); if (dlHandle == NULL) { const char* error = (const char*)dlerror(); + fprintf(stderr, + "-> Failed!\n %s\n", + (error != NULL ? error : "unknown")); LogError( "Failed to load plugin: " << filename.Filename() << ". Reason: " << (error != NULL ? error : "unknown")); ThrowMsg(Exceptions::PluginLibraryError, "Library error"); } + fprintf(stderr, "-> Done.\n"); + const js_entity_definition_t *rawEntityList = NULL; get_widget_entity_map_proc *getWidgetEntityMapProcPtr = NULL;