How to make gdb to pthread_create on Mandrake 9.x ?

0 views
Skip to first unread message

markw

unread,
Aug 5, 2003, 4:46:08 PM8/5/03
to
How to make gdb to pthread_create on Mandrake 9.x ?

I'm using gdb via DDD and pthread_create goes BOOM. Seems like a problem
others are having.

I'm not quite understanding all the factors such as Mandrake vs glibc vs
LinuxThreads vs pthreads (POSIX) and whatever.

I get the feeling that there could be some patches of upgrades that would
make my Mandrake 9 happy ?

Please advise. I need to debug this threaded app using GDB.

Loic Domaigne

unread,
Aug 6, 2003, 3:55:47 AM8/6/03
to
Hi!

> How to make gdb to pthread_create on Mandrake 9.x ?
>
> I'm using gdb via DDD and pthread_create goes BOOM. Seems like a problem
> others are having.

Let me guess... If you put a break point on pthread_create(), and do a
step, then you are getting nowhere, right? You obtain a message from
gdb similar to:

| Program received signal SIG32, Real-time event 32.
| 0x40061479 in sigsuspend () from /lib/i686/libc.so.6


Well, the reason why you are seeing this, is that the LinuxThreads lib
is probably stripped. You can check this as follows.

- find out where LT is located. Use ldd <your_binary>
- use the command "file" to verify if LT is stripped.

Here a snapshot:

[loic]$ ldd a.out
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40024000)
libc.so.6 => /lib/i686/libc.so.6 (0x40038000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

[loic]$ file /lib/i686/libpthread.so.0
/lib/i686/libpthread.so.0: symbolic link to libpthread-0.9.so

[loic]$ file /lib/i686/libpthread-0.9.so
/lib/i686/libpthread-0.9.so: ELF 32-bit LSB shared object, Intel
80386, version 1 (SYSV), stripped


This makes debugging nearly impossible. Notice that Gwenole, the
Mandrake guys responsible for the packaging, has been already informed
2 years ago or something of this problem (it was for the Mandrake 7.x
series). He fixed it in the 8.x series... But, apparently "he forgot"
that again in the 9.x...


> I'm not quite understanding all the factors such as Mandrake vs glibc vs
> LinuxThreads vs pthreads (POSIX) and whatever.

Uh... That would be a very, very long story. Please, browse the
archives on c.p.t (not that I wouldn't be pleased to tell you the
whole story, but I don't have the time right now).



> I get the feeling that there could be some patches of upgrades that would
> make my Mandrake 9 happy ?

No, there is no patches for that. As long as Gwenole insists to
provide stripped library, the problem shall occur.



> Please advise. I need to debug this threaded app using GDB.

What you can do is to download the source of the glibc, and re-compile
the LT so that it doesn't get stripped.

... Or put pressure on the packager, and ask for a... let's see...
"more debugging friendly Pthread library" (or "less brain damaged",
but I believe the first formulation could receive a better acceptance
;-)


Good Luck!
Loic.

Reply all
Reply to author
Forward
0 new messages