Add DLOpen and DLSym wrappers
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Tue, 6 Feb 2018 19:26:29 +0000 (22:26 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Tue, 6 Feb 2018 19:26:29 +0000 (22:26 +0300)
src/debug/netcoredbg/platform.cpp
src/debug/netcoredbg/platform.h

index 2b4e4667192b91963c30fbde18678097ae314256..1e3fa19cf0fefe8aecc22cc4e7cabc3930230c3a 100644 (file)
@@ -171,3 +171,13 @@ void USleep(uint32_t duration)
 {
     usleep(duration);
 }
+
+void *DLOpen(const std::string &path)
+{
+    return dlopen(path.c_str(), RTLD_GLOBAL | RTLD_NOW);
+}
+
+void *DLSym(void *handle, const std::string &name)
+{
+    return dlsym(handle, name.c_str());
+}
index fd99e5ddf49f5ed3d1c5e6ab9f93a50d0ab3dc0b..c14d9899d467a22d193c6cbee315b7028d58622f 100644 (file)
@@ -8,3 +8,5 @@ std::string GetExeAbsPath();
 std::string GetFileName(const std::string &path);
 bool SetWorkDir(const std::string &path);
 void USleep(uint32_t duration);
+void *DLOpen(const std::string &path);
+void *DLSym(void *handle, const std::string &name);