Version: (using KDE KDE 3.4.0) Installed from: SuSE RPMs Compiler: gcc 3.3.5 OS: Linux If the application is multithreaded a set breakpoint in the thread never get caught. Also, if it is in the bad mood the debugger gets into a wierd state and you won't be able to start new debugging without restarting the IDE. In the Project Options I have the folowing addition flags: LDFLAGS: -lpthread CXXFLAGS: -pthread I've tried all combination of the above flags with no luck. Here is a simple example just put a break point on the printf in the thread code. Then execute it and you will see it will not break. Also, if you catch it in the right moment it will render debugger useless. #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <iostream> #include <cstdlib> #include <pthread.h> using namespace std; //void *(*__start_routine) (void *) void* thread(void* pData) { while(1) { printf("Worker has started...\r\n"); sleep(1); } } int main(int argc, char *argv[]) { printf("Starting main...\r\n"); pthread_t id; pthread_create( &id, NULL, thread, NULL); while( true ) sleep(1); return EXIT_SUCCESS; }
I cannot reproduce this here with your code snippet. (current svn of KDevelop and gdb 6.4 as well as with gdb 6.5) Breakpoints can be set into thread as well as the main and debugger interrupts if they are reached.
Works here too. Assuming fixed.