summaryrefslogtreecommitdiff
path: root/src/plugin.cpp
diff options
context:
space:
mode:
authorTime Penhey <tim.penhey@canonical.com>2011-08-12 19:45:09 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-08-12 19:45:09 +0800
commit7f81a43a28e96d8658c1ea2b9fcf9249aedd0b0d (patch)
tree7737a26101392214e4fe33748c962684a7e89111 /src/plugin.cpp
parent81b7cb57b877af608e5077e9932098407c1775c9 (diff)
downloadmobileperf-7f81a43a28e96d8658c1ea2b9fcf9249aedd0b0d.tar.gz
mobileperf-7f81a43a28e96d8658c1ea2b9fcf9249aedd0b0d.tar.bz2
Merge in flags change for dlopen () on debug builds (dlclosing () with valgrind
is a bit useless)
Diffstat (limited to 'src/plugin.cpp')
-rw-r--r--src/plugin.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugin.cpp b/src/plugin.cpp
index 7aff05f..10afaab 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -154,7 +154,14 @@ dlloaderLoadPlugin (CompPlugin *p,
return false;
}
- dlhand = dlopen (file.c_str (), RTLD_LAZY);
+ int open_flags = RTLD_LAZY;
+#ifdef DEBUG
+ // Do not unload the library during dlclose.
+ open_flags |= RTLD_NODELETE;
+ // Make the symbols available globally
+ open_flags |= RTLD_GLOBAL;
+#endif
+ dlhand = dlopen (file.c_str (), open_flags);
if (dlhand)
{
PluginGetInfoProc getInfo;