From 114a878c64ce6f8223cfd22d76a20eb16d177e5e Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- languages/cpp/debugger/tests/README.txt | 4 + languages/cpp/debugger/tests/breakpoints/Makefile | 4 + .../cpp/debugger/tests/breakpoints/README.txt | 2 + .../tests/breakpoints/breakpoints.kdevelop | 163 +++++++++++++++ languages/cpp/debugger/tests/breakpoints/foo.cpp | 10 + languages/cpp/debugger/tests/breakpoints/main.cpp | 38 ++++ languages/cpp/debugger/tests/dll/Makefile | 8 + languages/cpp/debugger/tests/dll/README.txt | 3 + languages/cpp/debugger/tests/dll/dll.kdevelop | 158 +++++++++++++++ languages/cpp/debugger/tests/dll/helper.cpp | 6 + languages/cpp/debugger/tests/dll/main.cpp | 15 ++ .../cpp/debugger/tests/infinite_loop/Makefile | 4 + .../cpp/debugger/tests/infinite_loop/README.txt | 3 + .../debugger/tests/infinite_loop/infinite_loop.cpp | 17 ++ .../tests/infinite_loop/infinite_loop.kdevelop | 109 +++++++++++ .../cpp/debugger/tests/print_pointers/Makefile | 3 + .../tests/print_pointers/print_pointers.cpp | 95 +++++++++ .../tests/print_pointers/print_pointers.kdevelop | 218 +++++++++++++++++++++ languages/cpp/debugger/tests/segfault/Makefile | 4 + languages/cpp/debugger/tests/segfault/README.txt | 3 + languages/cpp/debugger/tests/segfault/segfault.cpp | 7 + .../cpp/debugger/tests/segfault/segfault.kdevelop | 163 +++++++++++++++ languages/cpp/debugger/tests/threads/Makefile | 4 + languages/cpp/debugger/tests/threads/README.txt | 4 + languages/cpp/debugger/tests/threads/threads.cpp | 26 +++ .../cpp/debugger/tests/threads/threads.kdevelop | 101 ++++++++++ languages/cpp/debugger/tests/tracing/Makefile | 4 + languages/cpp/debugger/tests/tracing/main.cpp | 15 ++ .../cpp/debugger/tests/tracing/tracing.kdevelop | 163 +++++++++++++++ languages/cpp/debugger/tests/two_module/Makefile | 4 + languages/cpp/debugger/tests/two_module/README.txt | 2 + languages/cpp/debugger/tests/two_module/main.cpp | 8 + .../cpp/debugger/tests/two_module/src/foo.cpp | 12 ++ .../debugger/tests/two_module/two_module.kdevelop | 163 +++++++++++++++ 34 files changed, 1543 insertions(+) create mode 100644 languages/cpp/debugger/tests/README.txt create mode 100644 languages/cpp/debugger/tests/breakpoints/Makefile create mode 100644 languages/cpp/debugger/tests/breakpoints/README.txt create mode 100644 languages/cpp/debugger/tests/breakpoints/breakpoints.kdevelop create mode 100644 languages/cpp/debugger/tests/breakpoints/foo.cpp create mode 100644 languages/cpp/debugger/tests/breakpoints/main.cpp create mode 100644 languages/cpp/debugger/tests/dll/Makefile create mode 100644 languages/cpp/debugger/tests/dll/README.txt create mode 100644 languages/cpp/debugger/tests/dll/dll.kdevelop create mode 100644 languages/cpp/debugger/tests/dll/helper.cpp create mode 100644 languages/cpp/debugger/tests/dll/main.cpp create mode 100644 languages/cpp/debugger/tests/infinite_loop/Makefile create mode 100644 languages/cpp/debugger/tests/infinite_loop/README.txt create mode 100644 languages/cpp/debugger/tests/infinite_loop/infinite_loop.cpp create mode 100644 languages/cpp/debugger/tests/infinite_loop/infinite_loop.kdevelop create mode 100644 languages/cpp/debugger/tests/print_pointers/Makefile create mode 100644 languages/cpp/debugger/tests/print_pointers/print_pointers.cpp create mode 100644 languages/cpp/debugger/tests/print_pointers/print_pointers.kdevelop create mode 100644 languages/cpp/debugger/tests/segfault/Makefile create mode 100644 languages/cpp/debugger/tests/segfault/README.txt create mode 100644 languages/cpp/debugger/tests/segfault/segfault.cpp create mode 100644 languages/cpp/debugger/tests/segfault/segfault.kdevelop create mode 100644 languages/cpp/debugger/tests/threads/Makefile create mode 100644 languages/cpp/debugger/tests/threads/README.txt create mode 100644 languages/cpp/debugger/tests/threads/threads.cpp create mode 100644 languages/cpp/debugger/tests/threads/threads.kdevelop create mode 100644 languages/cpp/debugger/tests/tracing/Makefile create mode 100644 languages/cpp/debugger/tests/tracing/main.cpp create mode 100644 languages/cpp/debugger/tests/tracing/tracing.kdevelop create mode 100644 languages/cpp/debugger/tests/two_module/Makefile create mode 100644 languages/cpp/debugger/tests/two_module/README.txt create mode 100644 languages/cpp/debugger/tests/two_module/main.cpp create mode 100644 languages/cpp/debugger/tests/two_module/src/foo.cpp create mode 100644 languages/cpp/debugger/tests/two_module/two_module.kdevelop (limited to 'languages/cpp/debugger/tests') 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 @@ + + + + Vladimir Prus + ghost@ghostwalk + $VERSION$ + KDevCustomProject + C++ + + . + false + + + + + breakpoints + executable + / + + false + true + + + + make + + + + false + 1 + 0 + false + + + + default + + + + + + + + + + + + + + true + false + false + + + false + true + 10 + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + + + false + 3 + /usr/share/qt3 + + + + set + m_,_ + theValue + true + true + + + false + true + Vertical + + + + + false + false + + + *.o,*.lo,CVS + false + + + + + .h + .cpp + + + 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 + +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 @@ + + + + Vladimir Prus + ghost@ghostwalk + $VERSION$ + KDevCustomProject + C++ + + . + false + + + + + main + executable + / + + false + true + + + + make + + + + false + 1 + 0 + false + + + + default + + + + + + + + + + + + + + true + false + false + + + false + true + 10 + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + + + + .h + .cpp + + + + + false + 3 + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + + + + set + m_,_ + theValue + true + true + + + + + + false + false + + + *.o,*.lo,CVS + false + + + 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 + +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 @@ + + + + Vladimir Prus + ghost@zigzag + $VERSION$ + KDevCustomProject + C++ + + + + + infinite_loop + executable + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + false + 0 + true + true + false + std=_GLIBCXX_STD;__gnu_cxx=std + true + false + + + + + false + false + + + *.o,*.lo,CVS + false + + + 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 +#include + +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 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 @@ + + + + Vladimir Prus + ghost@cs.msu.su + $VERSION$ + KDevCustomProject + C++ + + kdevsecurity + kdevkonsoleview + kdevreplace + kdevctags2 + kdevvalgrind + + . + false + + print_pointers + + + + print_pointers + executable + / + + false + true + + + + make + + + + false + 1 + 0 + false + + + + default + + + + + + *.java + *.h + *.H + *.hh + *.hxx + *.hpp + *.c + *.C + *.cc + *.cpp + *.c++ + *.cxx + Makefile + CMakeLists.txt + + + + + + + + + + + + true + false + false + + + true + true + 10 + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + + + + .h + .cpp + + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + false + 0 + true + true + false + std=_GLIBCXX_STD;__gnu_cxx<<std + true + false + false + false + true + true + true + false + .; + false + false + + + + set + m_,_ + theValue + true + true + + + + false + 3 + /usr/share/qt3 + 3 + EmbeddedKDevDesigner + /usr/bin/qmake-qt3 + /usr/bin/designer + + + + false + true + Vertical + + + + + false + false + + + *.o,*.lo,CVS + false + + + + VisualBoyAdvance + + + false + false + -f0 + -1 + + 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 @@ + + + + Vladimir Prus + ghost@zigzag + $VERSION$ + KDevCustomProject + C++ + + . + false + + + + + segfault + executable + / + + false + true + + + + make + + + + false + 1 + 0 + false + + + + default + + + + + + + + + + + + + + true + false + false + + + false + true + 10 + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + + + false + 3 + /usr/share/qt3 + + + + set + m_,_ + theValue + true + true + + + false + true + Vertical + + + + + false + false + + + *.o,*.lo,CVS + false + + + + + .h + .cpp + + + 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 + +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 @@ + + + + Vladimir Prus + ghost@zigzag + $VERSION$ + KDevCustomProject + C++ + + + + + threads + executable + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + + + + + false + false + + + *.o,*.lo,CVS + false + + + 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 @@ + + + + Vladimir Prus + ghost@ghostwalk + $VERSION$ + KDevCustomProject + C++ + + . + false + + + + + tracing + executable + / + + false + true + + + + make + + + + false + 1 + 0 + false + + + + default + + + + + + + + + + + + + + true + false + false + + + false + true + 10 + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + + + false + 3 + /usr/share/qt3 + + + + set + m_,_ + theValue + true + true + + + false + true + Vertical + + + + + false + false + + + *.o,*.lo,CVS + false + + + + + .h + .cpp + + + 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 +#include + +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 @@ + + + + Vladimir Prus + ghost@ghostwalk + $VERSION$ + KDevCustomProject + C++ + + . + false + + + + + two_module + executable + / + + false + true + + + + make + + + + false + 1 + 0 + false + + + + default + + + + + + + + + + + + + + true + false + false + + + false + true + 10 + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + qt-kdev3 + ruby + ruby_bugs + sdl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + + + + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + + + false + 3 + /usr/share/qt3 + + + + set + m_,_ + theValue + true + true + + + false + true + Vertical + + + + + false + false + + + *.o,*.lo,CVS + false + + + + + .h + .cpp + + + -- cgit v1.2.1