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 | |
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')
34 files changed, 1543 insertions, 0 deletions
diff --git a/languages/cpp/debugger/tests/README.txt b/languages/cpp/debugger/tests/README.txt new file mode 100644 index 00000000..1764b029 --- /dev/null +++ b/languages/cpp/debugger/tests/README.txt @@ -0,0 +1,4 @@ + +This directory contains some tests for debugger. They are not +automated, and most test have no description of expected behaviour, +but still it's better than nothing.
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/breakpoints/Makefile b/languages/cpp/debugger/tests/breakpoints/Makefile new file mode 100644 index 00000000..77d481f8 --- /dev/null +++ b/languages/cpp/debugger/tests/breakpoints/Makefile @@ -0,0 +1,4 @@ + +breakpoints: main.cpp foo.cpp + g++ -g -obreakpoints main.cpp foo.cpp +
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/breakpoints/README.txt b/languages/cpp/debugger/tests/breakpoints/README.txt new file mode 100644 index 00000000..5c441631 --- /dev/null +++ b/languages/cpp/debugger/tests/breakpoints/README.txt @@ -0,0 +1,2 @@ + +Supposed to test various kinds of breakpoints.
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/breakpoints/breakpoints.kdevelop b/languages/cpp/debugger/tests/breakpoints/breakpoints.kdevelop new file mode 100644 index 00000000..4b3b07c9 --- /dev/null +++ b/languages/cpp/debugger/tests/breakpoints/breakpoints.kdevelop @@ -0,0 +1,163 @@ +<?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>breakpoints</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> + <kdevcppsupport> + <references/> + <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> + <qt> + <used>false</used> + <version>3</version> + <root>/usr/share/qt3</root> + </qt> + <creategettersetter> + <prefixGet/> + <prefixSet>set</prefixSet> + <prefixVariable>m_,_</prefixVariable> + <parameterName>theValue</parameterName> + <inlineGet>true</inlineGet> + <inlineSet>true</inlineSet> + </creategettersetter> + <splitheadersource> + <enabled>false</enabled> + <synchronize>true</synchronize> + <orientation>Vertical</orientation> + </splitheadersource> + </kdevcppsupport> + <kdevfileview> + <groups> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidenonlocation>false</hidenonlocation> + </groups> + <tree> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + <hidenonprojectfiles>false</hidenonprojectfiles> + </tree> + </kdevfileview> + <cppsupportpart> + <filetemplates> + <interfacesuffix>.h</interfacesuffix> + <implementationsuffix>.cpp</implementationsuffix> + </filetemplates> + </cppsupportpart> +</kdevelop> diff --git a/languages/cpp/debugger/tests/breakpoints/foo.cpp b/languages/cpp/debugger/tests/breakpoints/foo.cpp new file mode 100644 index 00000000..a3cf399d --- /dev/null +++ b/languages/cpp/debugger/tests/breakpoints/foo.cpp @@ -0,0 +1,10 @@ + +#include <stdio.h> + +void foo(int a) +{ + int i = 10; + int i2 = 12; + int i3 = i + i2; + printf("i3 = %d\n", i3); +}
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/breakpoints/main.cpp b/languages/cpp/debugger/tests/breakpoints/main.cpp new file mode 100644 index 00000000..81a5851f --- /dev/null +++ b/languages/cpp/debugger/tests/breakpoints/main.cpp @@ -0,0 +1,38 @@ + +void foo(int); + +void set_value(int* i) +{ + *i = 10; +} + +void modify(int* i) +{ + *i = 15; +} + +void read(int* i) +{ + static int i2; + i2 = *i; +} + +int test_main(int* i) +{ + foo(5); + set_value(i); + + modify(i); + read(i); + + for(unsigned j = 0; j < 10; ++j) + foo(j); + + return 0; +} + +int main() +{ + int var; + return test_main(&var); +} 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; +} diff --git a/languages/cpp/debugger/tests/infinite_loop/Makefile b/languages/cpp/debugger/tests/infinite_loop/Makefile new file mode 100644 index 00000000..7d32cd85 --- /dev/null +++ b/languages/cpp/debugger/tests/infinite_loop/Makefile @@ -0,0 +1,4 @@ + +infinite_loop: infinite_loop.cpp + g++ -g -oinfinite_loop infinite_loop.cpp +
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/infinite_loop/README.txt b/languages/cpp/debugger/tests/infinite_loop/README.txt new file mode 100644 index 00000000..1c008ee6 --- /dev/null +++ b/languages/cpp/debugger/tests/infinite_loop/README.txt @@ -0,0 +1,3 @@ + +Tests that we can stop a program with the "Interrupt" command. + diff --git a/languages/cpp/debugger/tests/infinite_loop/infinite_loop.cpp b/languages/cpp/debugger/tests/infinite_loop/infinite_loop.cpp new file mode 100644 index 00000000..ca90a055 --- /dev/null +++ b/languages/cpp/debugger/tests/infinite_loop/infinite_loop.cpp @@ -0,0 +1,17 @@ + +int foo() +{ + int i = 0; + for(;;) + { + i = i+1; + } + return i; +} + +int main() +{ + int r = 10; + r += foo(); + return r; +}
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/infinite_loop/infinite_loop.kdevelop b/languages/cpp/debugger/tests/infinite_loop/infinite_loop.kdevelop new file mode 100644 index 00000000..24055c6f --- /dev/null +++ b/languages/cpp/debugger/tests/infinite_loop/infinite_loop.kdevelop @@ -0,0 +1,109 @@ +<?xml version = '1.0'?> +<kdevelop> + <general> + <author>Vladimir Prus</author> + <email>ghost@zigzag</email> + <version>$VERSION$</version> + <projectmanagement>KDevCustomProject</projectmanagement> + <primarylanguage>C++</primarylanguage> + <ignoreparts/> + </general> + <kdevcustomproject> + <run> + <mainprogram>infinite_loop</mainprogram> + <directoryradio>executable</directoryradio> + </run> + </kdevcustomproject> + <kdevdebugger> + <general> + <dbgshell/> + </general> + </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> + <kdevcppsupport> + <references/> + <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> + <showOnlyAccessibleItems>false</showOnlyAccessibleItems> + <completionBoxItemOrder>0</completionBoxItemOrder> + <howEvaluationContextMenu>true</howEvaluationContextMenu> + <showCommentWithArgumentHint>true</showCommentWithArgumentHint> + <statusBarTypeEvaluation>false</statusBarTypeEvaluation> + <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases> + <processPrimaryTypes>true</processPrimaryTypes> + <processFunctionArguments>false</processFunctionArguments> + </codecompletion> + </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/print_pointers/Makefile b/languages/cpp/debugger/tests/print_pointers/Makefile new file mode 100644 index 00000000..0eafe22f --- /dev/null +++ b/languages/cpp/debugger/tests/print_pointers/Makefile @@ -0,0 +1,3 @@ + +print_pointers: print_pointers.cpp + g++ -g -o print_pointers -I/usr/share/qt3/include print_pointers.cpp -lqt-mt
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/print_pointers/print_pointers.cpp b/languages/cpp/debugger/tests/print_pointers/print_pointers.cpp new file mode 100644 index 00000000..09053b51 --- /dev/null +++ b/languages/cpp/debugger/tests/print_pointers/print_pointers.cpp @@ -0,0 +1,95 @@ + +#include <qstring.h> +#include <vector> + +struct B { int i; int j; static int k; }; +struct C { int a[3]; }; +struct D { int *ptr; }; +int B::k = 11; +typedef int (*fp)(int); + +int g = 10; +int g2 = 23; + +void func2() +{ + int foobar = 123; + printf("func2\n"); +} + +void func(QString& xs) +{ + int ac = 10; + std::string s; + func2(); + g = 10; + xs = "foo"; + +} + +class Test +{ + public: + QString n; + int b; +}; + +int test_main(int ac, char* av[]) +{ + printf("Hello world\n"); + int i = 10; + int* p1 = 0x00000000; + int** p1_p = &p1; + p1 = &g; + + B* p2 = (B*)0x12345678; + g = 77; + int (*p3)(int) = (fp)0x000000AE; + B p4 = {1, 3}; + p2 = &p4; + int p5[] = {5, 6, 7}; + int* p6[] = {&g, &g2}; + int p7[][2] = {{1,2}, {5,6}}; + B p8[] = {{1,2}, {3,4}}; + C p9 = {{7, 8, 9}}; + g = 77; + const D p9_1 = {&g}; + { + B p9_1; + int i = 15; + printf("p9_1\n"); + } + B& p10 = p4; + int& p11 = *p1; + int (*p12)[3] = &p5; + int (&p13)[3] = p5; + char p14[6] = "abc"; + wchar_t* p15 = L"test1"; + + + QString s = "test test test test"; + QString* sp = &s; + const QString& sr = s; + func(s); + i = 15; + + std::vector<int> v; + + Test* test = new Test; + Test& test2 = *test; + test->n = "foo"; + printf("hi\n"); + test = 0; + printf("hi2\n"); + printf("hi %d\n", test->b); + + + + p5[1] = 14; + return 0; +} + +int main(int ac, char* av[]) +{ + return test_main(ac, av); +} diff --git a/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop b/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop new file mode 100644 index 00000000..03faba9a --- /dev/null +++ b/languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop @@ -0,0 +1,218 @@ +<?xml version = '1.0'?> +<kdevelop> + <general> + <author>Vladimir Prus</author> + <email>ghost@cs.msu.su</email> + <version>$VERSION$</version> + <projectmanagement>KDevCustomProject</projectmanagement> + <primarylanguage>C++</primarylanguage> + <ignoreparts> + <part>kdevsecurity</part> + <part>kdevkonsoleview</part> + <part>kdevreplace</part> + <part>kdevctags2</part> + <part>kdevvalgrind</part> + </ignoreparts> + <projectdirectory>.</projectdirectory> + <absoluteprojectpath>false</absoluteprojectpath> + <description/> + <projectname>print_pointers</projectname> + </general> + <kdevcustomproject> + <run> + <mainprogram>print_pointers</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> + <filetypes> + <filetype>*.java</filetype> + <filetype>*.h</filetype> + <filetype>*.H</filetype> + <filetype>*.hh</filetype> + <filetype>*.hxx</filetype> + <filetype>*.hpp</filetype> + <filetype>*.c</filetype> + <filetype>*.C</filetype> + <filetype>*.cc</filetype> + <filetype>*.cpp</filetype> + <filetype>*.c++</filetype> + <filetype>*.cxx</filetype> + <filetype>Makefile</filetype> + <filetype>CMakeLists.txt</filetype> + </filetypes> + <blacklist/> + </kdevcustomproject> + <kdevdebugger> + <general> + <dbgshell/> + <programargs/> + <gdbpath/> + <configGdbScript/> + <runShellScript/> + <runGdbScript/> + <breakonloadinglibs>true</breakonloadinglibs> + <separatetty>false</separatetty> + <floatingtoolbar>false</floatingtoolbar> + </general> + <display> + <staticmembers>true</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> + <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> + <showOnlyAccessibleItems>false</showOnlyAccessibleItems> + <completionBoxItemOrder>0</completionBoxItemOrder> + <howEvaluationContextMenu>true</howEvaluationContextMenu> + <showCommentWithArgumentHint>true</showCommentWithArgumentHint> + <statusBarTypeEvaluation>false</statusBarTypeEvaluation> + <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx<<std</namespaceAliases> + <processPrimaryTypes>true</processPrimaryTypes> + <processFunctionArguments>false</processFunctionArguments> + <preProcessAllHeaders>false</preProcessAllHeaders> + <parseMissingHeaders>false</parseMissingHeaders> + <resolveIncludePaths>true</resolveIncludePaths> + <alwaysParseInBackground>true</alwaysParseInBackground> + <usePermanentCaching>true</usePermanentCaching> + <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces> + <includePaths>.;</includePaths> + <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental> + <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental> + </codecompletion> + <creategettersetter> + <prefixGet/> + <prefixSet>set</prefixSet> + <prefixVariable>m_,_</prefixVariable> + <parameterName>theValue</parameterName> + <inlineGet>true</inlineGet> + <inlineSet>true</inlineSet> + </creategettersetter> + <references/> + <qt> + <used>false</used> + <version>3</version> + <root>/usr/share/qt3</root> + <includestyle>3</includestyle> + <designerintegration>EmbeddedKDevDesigner</designerintegration> + <qmake>/usr/bin/qmake-qt3</qmake> + <designer>/usr/bin/designer</designer> + <designerpluginpaths/> + </qt> + <splitheadersource> + <enabled>false</enabled> + <synchronize>true</synchronize> + <orientation>Vertical</orientation> + </splitheadersource> + </kdevcppsupport> + <kdevfileview> + <groups> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidenonlocation>false</hidenonlocation> + </groups> + <tree> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + <hidenonprojectfiles>false</hidenonprojectfiles> + </tree> + </kdevfileview> + <kdevvisualadvance> + <emulator>VisualBoyAdvance</emulator> + <binary/> + <addOptions/> + <terminal>false</terminal> + <fullscreen>false</fullscreen> + <graphicFilter>-f0</graphicFilter> + <scaling>-1</scaling> + </kdevvisualadvance> +</kdevelop> diff --git a/languages/cpp/debugger/tests/segfault/Makefile b/languages/cpp/debugger/tests/segfault/Makefile new file mode 100644 index 00000000..eebc5385 --- /dev/null +++ b/languages/cpp/debugger/tests/segfault/Makefile @@ -0,0 +1,4 @@ + +segfault: segfault.cpp + g++ -g -osegfault segfault.cpp +
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/segfault/README.txt b/languages/cpp/debugger/tests/segfault/README.txt new file mode 100644 index 00000000..c36254de --- /dev/null +++ b/languages/cpp/debugger/tests/segfault/README.txt @@ -0,0 +1,3 @@ + +Tests that we correctly report segfault in a debugged program. + diff --git a/languages/cpp/debugger/tests/segfault/segfault.cpp b/languages/cpp/debugger/tests/segfault/segfault.cpp new file mode 100644 index 00000000..3a77e500 --- /dev/null +++ b/languages/cpp/debugger/tests/segfault/segfault.cpp @@ -0,0 +1,7 @@ + + +int main() +{ + int* ptr = 0; + *ptr = 10; +}
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/segfault/segfault.kdevelop b/languages/cpp/debugger/tests/segfault/segfault.kdevelop new file mode 100644 index 00000000..0135e84b --- /dev/null +++ b/languages/cpp/debugger/tests/segfault/segfault.kdevelop @@ -0,0 +1,163 @@ +<?xml version = '1.0'?> +<kdevelop> + <general> + <author>Vladimir Prus</author> + <email>ghost@zigzag</email> + <version>$VERSION$</version> + <projectmanagement>KDevCustomProject</projectmanagement> + <primarylanguage>C++</primarylanguage> + <ignoreparts/> + <projectdirectory>.</projectdirectory> + <absoluteprojectpath>false</absoluteprojectpath> + <description></description> + </general> + <kdevcustomproject> + <run> + <mainprogram>segfault</mainprogram> + <directoryradio>executable</directoryradio> + <customdirectory>/</customdirectory> + <programargs></programargs> + <terminal>false</terminal> + <autocompile>true</autocompile> + <envvars/> + </run> + <build> + <buildtool>make</buildtool> + <builddir></builddir> + </build> + <make> + <abortonerror>false</abortonerror> + <numberofjobs>1</numberofjobs> + <prio>0</prio> + <dontact>false</dontact> + <makebin></makebin> + <defaulttarget></defaulttarget> + <makeoptions></makeoptions> + <selectedenvironment>default</selectedenvironment> + <environments> + <default/> + </environments> + </make> + </kdevcustomproject> + <kdevdebugger> + <general> + <dbgshell></dbgshell> + <programargs></programargs> + <gdbpath></gdbpath> + <configGdbScript></configGdbScript> + <runShellScript></runShellScript> + <runGdbScript></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> + <kdevcppsupport> + <references/> + <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> + <qt> + <used>false</used> + <version>3</version> + <root>/usr/share/qt3</root> + </qt> + <creategettersetter> + <prefixGet></prefixGet> + <prefixSet>set</prefixSet> + <prefixVariable>m_,_</prefixVariable> + <parameterName>theValue</parameterName> + <inlineGet>true</inlineGet> + <inlineSet>true</inlineSet> + </creategettersetter> + <splitheadersource> + <enabled>false</enabled> + <synchronize>true</synchronize> + <orientation>Vertical</orientation> + </splitheadersource> + </kdevcppsupport> + <kdevfileview> + <groups> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidenonlocation>false</hidenonlocation> + </groups> + <tree> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + <hidenonprojectfiles>false</hidenonprojectfiles> + </tree> + </kdevfileview> + <cppsupportpart> + <filetemplates> + <interfacesuffix>.h</interfacesuffix> + <implementationsuffix>.cpp</implementationsuffix> + </filetemplates> + </cppsupportpart> +</kdevelop> diff --git a/languages/cpp/debugger/tests/threads/Makefile b/languages/cpp/debugger/tests/threads/Makefile new file mode 100644 index 00000000..8db14799 --- /dev/null +++ b/languages/cpp/debugger/tests/threads/Makefile @@ -0,0 +1,4 @@ + +threads: threads.cpp + g++ -g -othreads threads.cpp -pthread +
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/threads/README.txt b/languages/cpp/debugger/tests/threads/README.txt new file mode 100644 index 00000000..3d84fae1 --- /dev/null +++ b/languages/cpp/debugger/tests/threads/README.txt @@ -0,0 +1,4 @@ + +Tests with a threaded application. Makes sure that the +list of threads is shown that that switching threads works. + diff --git a/languages/cpp/debugger/tests/threads/threads.cpp b/languages/cpp/debugger/tests/threads/threads.cpp new file mode 100644 index 00000000..f412ef7c --- /dev/null +++ b/languages/cpp/debugger/tests/threads/threads.cpp @@ -0,0 +1,26 @@ + +#include <pthread.h> + +void runner(int i) +{ + for(int i = 0; i < 1000000;) + ++i; +} + +void* thread(void* p) +{ + runner((int)p); +} + +int main() +{ + pthread_t p1, p2; + + pthread_create(&p1, 0, &thread, (void*)1); + pthread_create(&p2, 0, &thread, (void*)2); + + pthread_join(p1, 0); + pthread_join(p2, 0); + + return 0; +}
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/threads/threads.kdevelop b/languages/cpp/debugger/tests/threads/threads.kdevelop new file mode 100644 index 00000000..3cd806b8 --- /dev/null +++ b/languages/cpp/debugger/tests/threads/threads.kdevelop @@ -0,0 +1,101 @@ +<?xml version = '1.0'?> +<kdevelop> + <general> + <author>Vladimir Prus</author> + <email>ghost@zigzag</email> + <version>$VERSION$</version> + <projectmanagement>KDevCustomProject</projectmanagement> + <primarylanguage>C++</primarylanguage> + <ignoreparts/> + </general> + <kdevcustomproject> + <run> + <mainprogram>threads</mainprogram> + <directoryradio>executable</directoryradio> + </run> + </kdevcustomproject> + <kdevdebugger> + <general> + <dbgshell/> + </general> + </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> + <kdevcppsupport> + <references/> + <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> + </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/tracing/Makefile b/languages/cpp/debugger/tests/tracing/Makefile new file mode 100644 index 00000000..22333f01 --- /dev/null +++ b/languages/cpp/debugger/tests/tracing/Makefile @@ -0,0 +1,4 @@ + +tracing: main.cpp + g++ -g -otracing main.cpp +
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/tracing/main.cpp b/languages/cpp/debugger/tests/tracing/main.cpp new file mode 100644 index 00000000..4a1a38d7 --- /dev/null +++ b/languages/cpp/debugger/tests/tracing/main.cpp @@ -0,0 +1,15 @@ + +// Алгоритм Евклида вычисления наибольшего общего делителя +int main() +{ + int i, j; + i = 157; + j = 312; + + while( i != j ) + { + if( i > j ) i = i-j; + else j = j-i; + } + return 0; +} diff --git a/languages/cpp/debugger/tests/tracing/tracing.kdevelop b/languages/cpp/debugger/tests/tracing/tracing.kdevelop new file mode 100644 index 00000000..94d39c6f --- /dev/null +++ b/languages/cpp/debugger/tests/tracing/tracing.kdevelop @@ -0,0 +1,163 @@ +<?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>tracing</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> + <kdevcppsupport> + <references/> + <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> + <qt> + <used>false</used> + <version>3</version> + <root>/usr/share/qt3</root> + </qt> + <creategettersetter> + <prefixGet/> + <prefixSet>set</prefixSet> + <prefixVariable>m_,_</prefixVariable> + <parameterName>theValue</parameterName> + <inlineGet>true</inlineGet> + <inlineSet>true</inlineSet> + </creategettersetter> + <splitheadersource> + <enabled>false</enabled> + <synchronize>true</synchronize> + <orientation>Vertical</orientation> + </splitheadersource> + </kdevcppsupport> + <kdevfileview> + <groups> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidenonlocation>false</hidenonlocation> + </groups> + <tree> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + <hidenonprojectfiles>false</hidenonprojectfiles> + </tree> + </kdevfileview> + <cppsupportpart> + <filetemplates> + <interfacesuffix>.h</interfacesuffix> + <implementationsuffix>.cpp</implementationsuffix> + </filetemplates> + </cppsupportpart> +</kdevelop> diff --git a/languages/cpp/debugger/tests/two_module/Makefile b/languages/cpp/debugger/tests/two_module/Makefile new file mode 100644 index 00000000..edd1a242 --- /dev/null +++ b/languages/cpp/debugger/tests/two_module/Makefile @@ -0,0 +1,4 @@ + +two_module: main.cpp src/foo.cpp + g++ -g -I/usr/share/qt3/include -otwo_module main.cpp src/foo.cpp -lqt-mt +
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/two_module/README.txt b/languages/cpp/debugger/tests/two_module/README.txt new file mode 100644 index 00000000..31bb0249 --- /dev/null +++ b/languages/cpp/debugger/tests/two_module/README.txt @@ -0,0 +1,2 @@ + +Very basic tests containing two modules.
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/two_module/main.cpp b/languages/cpp/debugger/tests/two_module/main.cpp new file mode 100644 index 00000000..30863389 --- /dev/null +++ b/languages/cpp/debugger/tests/two_module/main.cpp @@ -0,0 +1,8 @@ + +void foo(int); + +int main(int ac, char* av[]) +{ + foo(5); + return 0; +} diff --git a/languages/cpp/debugger/tests/two_module/src/foo.cpp b/languages/cpp/debugger/tests/two_module/src/foo.cpp new file mode 100644 index 00000000..b66f9924 --- /dev/null +++ b/languages/cpp/debugger/tests/two_module/src/foo.cpp @@ -0,0 +1,12 @@ + +#include <stdio.h> +#include <qstring.h> + +void foo(int a) +{ + QString s = "foo"; + int i = 10; + int i2 = 12; + int i3 = i + i2; + printf("i3 = %d\n", i3); +}
\ No newline at end of file diff --git a/languages/cpp/debugger/tests/two_module/two_module.kdevelop b/languages/cpp/debugger/tests/two_module/two_module.kdevelop new file mode 100644 index 00000000..a9ecc5ad --- /dev/null +++ b/languages/cpp/debugger/tests/two_module/two_module.kdevelop @@ -0,0 +1,163 @@ +<?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></description> + </general> + <kdevcustomproject> + <run> + <mainprogram>two_module</mainprogram> + <directoryradio>executable</directoryradio> + <customdirectory>/</customdirectory> + <programargs></programargs> + <terminal>false</terminal> + <autocompile>true</autocompile> + <envvars/> + </run> + <build> + <buildtool>make</buildtool> + <builddir></builddir> + </build> + <make> + <abortonerror>false</abortonerror> + <numberofjobs>1</numberofjobs> + <prio>0</prio> + <dontact>false</dontact> + <makebin></makebin> + <defaulttarget></defaulttarget> + <makeoptions></makeoptions> + <selectedenvironment>default</selectedenvironment> + <environments> + <default/> + </environments> + </make> + </kdevcustomproject> + <kdevdebugger> + <general> + <dbgshell></dbgshell> + <programargs></programargs> + <gdbpath></gdbpath> + <configGdbScript></configGdbScript> + <runShellScript></runShellScript> + <runGdbScript></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> + <kdevcppsupport> + <references/> + <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> + <qt> + <used>false</used> + <version>3</version> + <root>/usr/share/qt3</root> + </qt> + <creategettersetter> + <prefixGet></prefixGet> + <prefixSet>set</prefixSet> + <prefixVariable>m_,_</prefixVariable> + <parameterName>theValue</parameterName> + <inlineGet>true</inlineGet> + <inlineSet>true</inlineSet> + </creategettersetter> + <splitheadersource> + <enabled>false</enabled> + <synchronize>true</synchronize> + <orientation>Vertical</orientation> + </splitheadersource> + </kdevcppsupport> + <kdevfileview> + <groups> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidenonlocation>false</hidenonlocation> + </groups> + <tree> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + <hidenonprojectfiles>false</hidenonprojectfiles> + </tree> + </kdevfileview> + <cppsupportpart> + <filetemplates> + <interfacesuffix>.h</interfacesuffix> + <implementationsuffix>.cpp</implementationsuffix> + </filetemplates> + </cppsupportpart> +</kdevelop> |