I am not able to debug threaded programs as I expect. The following program illustrates: <begin> #include <pthread.h> #include <signal.h> #include <stdio.h> #include <unistd.h> static int die=0; void intHandler(int sig) { die = 1; } void *troutine( void *arg ) { for(;;) { printf("troutine\n"); sleep(1); if (die) return 0; } } int main() { signal( SIGINT, intHandler ); pthread_t thread; pthread_create( &thread, 0, troutine, 0 ); pthread_join( thread, 0 ); printf("exiting\n"); return 0; } <end> After compiling with: gcc -g -lpthread pt_tst.c -o pt_tst I run gdb and send the following commands: gdb ./pt_tst (gdb) b main (gdb) r (gdb) b troutine (gdb) c On the last continue gdb tells me this: (gdb) c Continuing. Couldn't get registers: No such process. If I run gdb with LD_ASSUME_KERNEL=2.4.21 things seem to work properly. Is this a known issue? -K
On Thu, 2004-06-10 at 08:32, Kelly Burkhart wrote: <snip>
If I run gdb with LD_ASSUME_KERNEL=2.4.21 things seem to work properly. Is this a known issue?
After trying to proceed on my non-trivial program with LD_ASSUME_KERNEL set, it appears that is broken too. However it could take me a while to distill it into a trivial example. -K
participants (1)
-
Kelly Burkhart