Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing debugging symbols in pthread library

I am trying to debug (using gdb) a multi-threaded program, which uses POSIX threads.

I am getting message like :

Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.

looks like the library is not compiled with -g option.

Where can I find this library ? I tried to find it on web but I am not getting proper answers ...

Please help.

like image 837
Onkar Mahajan Avatar asked Jan 21 '23 03:01

Onkar Mahajan


2 Answers

First of all, unless you actually want to step inside pthread functions–or any other library–you won't need the debugging information for that library. You can still debug the main application without getting yourself into the libraries.

If you think there's a problem with a library, take a deep breath and look at your code again. Most common libraries (like pthread) have pretty solid code. If you still want to peer inside pthread_cond_wait(), look for a package for your library that looks something like "[pkg]-debuginfo". It should have what you want.

like image 66
Karmastan Avatar answered Feb 15 '23 21:02

Karmastan


if you are unable to find dbg libraries in your system, you can look at the required package debug version installing and using apt-file find 'library name' | grep dbg and install the one required for your system.

like image 29
user3342227 Avatar answered Feb 15 '23 22:02

user3342227