shodanex
shodanex

Reputation: 15406

How to get rid of libthread_db

On an embedded file system, I would like to get rid of libthread_db. My understanding was that it was only necessary when debugging a program using pthread. However, here is my observation :

So it seems libthread_db is essential to run any sort of program using pthread.

Upvotes: 2

Views: 6934

Answers (2)

Josh Wang
Josh Wang

Reputation: 405

you need to use target record

http://sources.redhat.com/ml/gdb/2010-07/msg00096.html

Upvotes: 0

Employed Russian
Employed Russian

Reputation: 213375

libthread_db is never used by a threaded program. It is only used by the debugger.

Your assertion that libthread_db is somehow required to run a program using pthreads is incorrect. If your pthread programs crash when libthread_db is removed from the system, something else is broken on your embedded target; removal of libthread_db merely triggers that something else.

You can trivially confirm this: build a pthread program on a regular Linux system. Run that program under strace, and observe that libthread_db does not appear in strace output. Now rename /lib/libthread_db.so.1 to something else, and observe that the test program continues to work just fine.

Upvotes: 6

Related Questions