diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/cpp/debugger/tests/dll | |
download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/debugger/tests/dll')
-rw-r--r-- | languages/cpp/debugger/tests/dll/Makefile | 8 | ||||
-rw-r--r-- | languages/cpp/debugger/tests/dll/README.txt | 3 | ||||
-rw-r--r-- | languages/cpp/debugger/tests/dll/dll.kdevelop | 158 | ||||
-rw-r--r-- | languages/cpp/debugger/tests/dll/helper.cpp | 6 | ||||
-rw-r--r-- | languages/cpp/debugger/tests/dll/main.cpp | 15 |
5 files changed, 190 insertions, 0 deletions
diff --git a/languages/cpp/debugger/tests/dll/Makefile b/languages/cpp/debugger/tests/dll/Makefile new file mode 100644 index 00000000..b49c732d --- /dev/null +++ b/languages/cpp/debugger/tests/dll/Makefile @@ -0,0 +1,8 @@ + +all: main libhelper.so + +main: main.cpp + g++ -g -o main main.cpp -ldl + +libhelper.so: helper.cpp + g++ -g -o libhelper.so -fPIC -shared helper.cpp
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/dll/README.txt b/languages/cpp/debugger/tests/dll/README.txt new file mode 100644 index 00000000..52b39e46 --- /dev/null +++ b/languages/cpp/debugger/tests/dll/README.txt @@ -0,0 +1,3 @@ + +Simple test that we can set breakpoint in dynamic library +loaded with 'dlopen' before the library is actually loaded.
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/dll/dll.kdevelop b/languages/cpp/debugger/tests/dll/dll.kdevelop new file mode 100644 index 00000000..dbeb12b3 --- /dev/null +++ b/languages/cpp/debugger/tests/dll/dll.kdevelop @@ -0,0 +1,158 @@ +<?xml version = '1.0'?> +<kdevelop> + <general> + <author>Vladimir Prus</author> + <email>ghost@ghostwalk</email> + <version>$VERSION$</version> + <projectmanagement>KDevCustomProject</projectmanagement> + <primarylanguage>C++</primarylanguage> + <ignoreparts/> + <projectdirectory>.</projectdirectory> + <absoluteprojectpath>false</absoluteprojectpath> + <description/> + </general> + <kdevcustomproject> + <run> + <mainprogram>main</mainprogram> + <directoryradio>executable</directoryradio> + <customdirectory>/</customdirectory> + <programargs/> + <terminal>false</terminal> + <autocompile>true</autocompile> + <envvars/> + </run> + <build> + <buildtool>make</buildtool> + <builddir/> + </build> + <make> + <abortonerror>false</abortonerror> + <numberofjobs>1</numberofjobs> + <prio>0</prio> + <dontact>false</dontact> + <makebin/> + <defaulttarget/> + <makeoptions/> + <selectedenvironment>default</selectedenvironment> + <environments> + <default/> + </environments> + </make> + </kdevcustomproject> + <kdevdebugger> + <general> + <dbgshell/> + <programargs/> + <gdbpath/> + <configGdbScript/> + <runShellScript/> + <runGdbScript/> + <breakonloadinglibs>true</breakonloadinglibs> + <separatetty>false</separatetty> + <floatingtoolbar>false</floatingtoolbar> + </general> + <display> + <staticmembers>false</staticmembers> + <demanglenames>true</demanglenames> + <outputradix>10</outputradix> + </display> + </kdevdebugger> + <kdevdoctreeview> + <ignoretocs> + <toc>ada</toc> + <toc>ada_bugs_gcc</toc> + <toc>bash</toc> + <toc>bash_bugs</toc> + <toc>clanlib</toc> + <toc>fortran_bugs_gcc</toc> + <toc>gnome1</toc> + <toc>gnustep</toc> + <toc>gtk</toc> + <toc>gtk_bugs</toc> + <toc>haskell</toc> + <toc>haskell_bugs_ghc</toc> + <toc>java_bugs_gcc</toc> + <toc>java_bugs_sun</toc> + <toc>kde2book</toc> + <toc>opengl</toc> + <toc>pascal_bugs_fp</toc> + <toc>php</toc> + <toc>php_bugs</toc> + <toc>perl</toc> + <toc>perl_bugs</toc> + <toc>python</toc> + <toc>python_bugs</toc> + <toc>qt-kdev3</toc> + <toc>ruby</toc> + <toc>ruby_bugs</toc> + <toc>sdl</toc> + <toc>sw</toc> + <toc>w3c-dom-level2-html</toc> + <toc>w3c-svg</toc> + <toc>w3c-uaag10</toc> + <toc>wxwidgets_bugs</toc> + </ignoretocs> + <ignoreqt_xml> + <toc>Guide to the Qt Translation Tools</toc> + <toc>Qt Assistant Manual</toc> + <toc>Qt Designer Manual</toc> + <toc>Qt Reference Documentation</toc> + <toc>qmake User Guide</toc> + </ignoreqt_xml> + <ignoredoxygen> + <toc>KDE Libraries (Doxygen)</toc> + </ignoredoxygen> + </kdevdoctreeview> + <kdevfilecreate> + <filetypes/> + <useglobaltypes> + <type ext="ui" /> + <type ext="cpp" /> + <type ext="h" /> + </useglobaltypes> + </kdevfilecreate> + <cppsupportpart> + <filetemplates> + <interfacesuffix>.h</interfacesuffix> + <implementationsuffix>.cpp</implementationsuffix> + </filetemplates> + </cppsupportpart> + <kdevcppsupport> + <qt> + <used>false</used> + <version>3</version> + <root/> + </qt> + <codecompletion> + <includeGlobalFunctions>true</includeGlobalFunctions> + <includeTypes>true</includeTypes> + <includeEnums>true</includeEnums> + <includeTypedefs>false</includeTypedefs> + <automaticCodeCompletion>true</automaticCodeCompletion> + <automaticArgumentsHint>true</automaticArgumentsHint> + <automaticHeaderCompletion>true</automaticHeaderCompletion> + <codeCompletionDelay>250</codeCompletionDelay> + <argumentsHintDelay>400</argumentsHintDelay> + <headerCompletionDelay>250</headerCompletionDelay> + </codecompletion> + <creategettersetter> + <prefixGet/> + <prefixSet>set</prefixSet> + <prefixVariable>m_,_</prefixVariable> + <parameterName>theValue</parameterName> + <inlineGet>true</inlineGet> + <inlineSet>true</inlineSet> + </creategettersetter> + <references/> + </kdevcppsupport> + <kdevfileview> + <groups> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidenonlocation>false</hidenonlocation> + </groups> + <tree> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + <hidenonprojectfiles>false</hidenonprojectfiles> + </tree> + </kdevfileview> +</kdevelop> diff --git a/languages/cpp/debugger/tests/dll/helper.cpp b/languages/cpp/debugger/tests/dll/helper.cpp new file mode 100644 index 00000000..eb59e95b --- /dev/null +++ b/languages/cpp/debugger/tests/dll/helper.cpp @@ -0,0 +1,6 @@ + +extern "C" int helper(int i) +{ + int j = i; + return j+10; +} 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; +} |