how to debug single thread using gdb
Hi All,
I have a written a function which will spawn a thread.
i want to debug the thread function.
func1()
{
pthread_create(&thread,NULL,thread_fun,&thread_arg);
}
thread_fun()
{
printf("inside function");
}
when i do the gdb
>gdb test
> b func1
>n
> thread created.
> info threads
> shows two threads.
> thread 2 (switched to 2nd thread)
I have tried: break filename:line number thread 2
After i have entered "continue".
program exited normally came
Then how to debug the thread_fun().
Please help me.
Regards,
venkat.
|