summaryrefslogtreecommitdiffstats
path: root/languages/cpp/debugger/tests/dll/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/debugger/tests/dll/main.cpp')
-rw-r--r--languages/cpp/debugger/tests/dll/main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/languages/cpp/debugger/tests/dll/main.cpp b/languages/cpp/debugger/tests/dll/main.cpp
new file mode 100644
index 00000000..ee91d5a2
--- /dev/null
+++ b/languages/cpp/debugger/tests/dll/main.cpp
@@ -0,0 +1,15 @@
+#include <dlfcn.h>
+
+typedef int (*ft)(int);
+
+int main()
+{
+ void* handle = dlopen("./libhelper.so", RTLD_LAZY);
+ void* sym = dlsym(handle, "helper");
+
+ ft f = (ft)sym;
+
+ f(10);
+ f(15);
+ return 0;
+}