pthreads and gdb

pthreads and gdb

Post by Shumway, Gordo » Thu, 08 Jun 2000 04:00:00



Does gdb support pthreads yet?
 
 
 

pthreads and gdb

Post by Zoran Cutur » Thu, 08 Jun 2000 04:00:00



> Does gdb support pthreads yet?

info gdb

will give you some points about threads with gdb.

        Z

 
 
 

pthreads and gdb

Post by Shumway, Gordo » Thu, 08 Jun 2000 04:00:00



> info gdb

> will give you some points about threads with gdb.

I have gdb-4.17.0.11-6 which I know does not support threads.  I was
wondering if the newer versions did.  I went to the cygnus site, but
found no mention of threads and gdb.
 
 
 

pthreads and gdb

Post by Juergen Hein » Thu, 08 Jun 2000 04:00:00




>> info gdb

>> will give you some points about threads with gdb.

>I have gdb-4.17.0.11-6 which I know does not support threads.  I was
>wondering if the newer versions did.  I went to the cygnus site, but
>found no mention of threads and gdb.

[...]

See ftp.varesearch.com/pub/support/hjl/gdb - gdb-5.0 does support
threads on Linux out of the box, although its a .0 version and at
times one ends up with SIGSEGV messages if a thread terminates.

On the move I have not played extensively, but for the time being
you might stick with H. J. Lu's versions.

Keep in mind that does not mean you cannot use gdb-5.0 as AFAICT
those messages are more confusing than anything else. Since there
are definitive enhancements gdb-5.0 might be worth a try - it works
quite well with ddd too, but stay tuned and perhaps read the
gnu.* news groups regarding fixes and such.

Cheers,
Juergen

--
\ Real name     : Jrgen Heinzl                 \       no flames      /

 
 
 

1. pthreads, GDB, Segmantation fault

i have written some soft. it uses pthreads :)) Of cause, i have
checked all my pointers and all the shared data is locked with
mutex's.

This soft is very stable (72+ hours) if i compile it with 100-200
threads as thread limit, it crashes in 5 minutes if i use 400-700
threads
with "Segmentation fault". If i use 1000 threads, it crashes in 10
seconds!

i have tried GDB to find the main bug

but GDB shows some strange state:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6193909 (LWP 5185)]
0x0804ff59 in connect_socksv4 (sockid=Cannot access memory at address
0x8
) at netio.c:143
143                     } else if ((rc = recvtimeout(sockid, (void *)
&thisrep,

(gdb) where
#0  0x0804ff59 in connect_socksv4 (sockid=Cannot access memory at
address 0x8
) at netio.c:143
Cannot access memory at address 0x0

this is the command line used for compiling:
gcc -ggdb -Wall -lpthread -D_REENTRANT

so, seems GDB have some trau8bles with stack? or? how can i debug and
what can be the trauble?

2. Jed

3. gdb extension for POSIX pthreads

4. xdm/kdm login fail

5. gdb & pthreads in Alpha linux 2.0.36

6. Newsprint 2.5B problem

7. GLIBC2 + pthreads + gdb?

8. /dev/kmem on AIX 4.3.3

9. gdb and pthreads hang

10. HELP! GDB & pthread support

11. help: need gdb with pthread support?

12. Debugging pthread based apps with gdb

13. pthreads & gdb: zombie threads?