HELP! GDB & pthread support

HELP! GDB & pthread support

Post by Pyun YongHyeo » Fri, 15 Jan 1999 04:00:00



Hi there.
I'm 3.0-RELEASE user.
I made some test programs which uses pthread library.
It worked very well.
After getting successful results, I tried to use GDB to get detailed
thread specific information.
But I could not see created threads in GDB.
The GDB command 'info threads' just print nothing as if it do not have
any threads.
No thread related commands work.

GDB in 3.0-RELEASE does not support threads?
Or is there any other ways to let GDB know threads?

Another question, when I link pthread application with '-lc_r' option ,
linker complains like this.
gcc -o mytest  a.o b.o c.o -lc_r

/usr/lib/libc.so: warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so: WARNING!  setkey(3) not present in the system!
/usr/lib/libc.so: WARNING!  des_setkey(3) not present in the system!
/usr/lib/libc.so: WARNING!  encrypt(3) not present in the system!
/usr/lib/libc.so: WARNING!  des_cipher(3) not present in the system!
/usr/lib/libc.so: warning: this program uses f_prealloc(), which is
stupid.

When I use '-pthread' option instead of '-lc_r', the linker says
nothing.
gcc -pthread -o mytest a.o b.o c.o

Is there any fundamental difference between '-lc_r' and '-pthread'
option?

Thanks.