Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-02-2014, 12:18 AM   #1
LQ Newbie
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
Unable to debug multi-threaded application on gdb


I am trying to debug a multi-threaded application for the first time. My specifications are ubuntu 13.10 and gdb 7.6.1.

The warning that I am getting is :

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

I read on a different website that GDB needs a version of that matches your, and is not finding such version.

Therefore, My libthread_db is in the path /lib/x86_64-linux-gnu/ and the inferior thread library is in path /lib/x86_64-linux-gnu/

But How can I match these library versions? If that is the problem

Awaiting for your response
Old 04-02-2014, 05:37 AM   #2
LQ Newbie
Registered: Feb 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
I have solved this problem.

The problem was that gdb was not able to find and load both and

Therefore, create a .gdbinit in your $HOME directory and add the following lines in it

set auto-load safe-path /
set libthread-db-search-path /lib/x86_64-linux-gnu (64-bit users)
set env LD_PRELOAD /lib/x86_64-linux-gnu/ (64-bit users)

Hope it helps to the person facing a similar problem.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem debugging a multi threaded program using gdb Ajay Kumar Linux - General 1 12-28-2011 03:00 PM
GDB control-C delivers SIGHUP to multi-threaded processes under Debian Lenny Drew Eckhardt Debian 0 05-09-2011 10:05 PM
GTK multi-threaded application akhil1 Programming 2 01-20-2009 03:59 AM
How to debug a multi-threaded program? nalsrayatko Programming 4 11-29-2007 01:57 PM
how to debug multi threaded application sibtay Programming 3 10-15-2004 12:02 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration