Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-23-2004, 10:54 AM   #1
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145

Rep: Reputation: 15
how to debug multi threaded application

can any one tell me how to debug using kdevelop or ddd tools i am creating application having five six threads and they are communicating with each other other
i have tryed to debug with kdevelop, ddd and other tools but unable to debug my code
Old 10-13-2004, 05:00 AM   #2
LQ Newbie
Registered: Oct 2004
Location: Kerala, India
Distribution: Debian
Posts: 3

Rep: Reputation: 0
GDB provides facility [a limited one] for debugging threaded programs.
It will automatically notify you when a new thread is created.
To view the threads u can use the command "info threads"
To avoid scheduler switching, u can set lock on scheduler using the command "set scheduler lock on"
To forcefully switch to a thread u can use the command "thread <thread no.>" where thread no is obtained by the "info threads" command.
Old 10-13-2004, 11:34 AM   #3
Registered: Sep 2003
Location: Rawalpindi, Pakistan
Distribution: Slackware
Posts: 86

Rep: Reputation: 15
The Valgrind distribution includes five tools: two memory error detectors, a thread error detector, a cache profiler and a heap profiler. Several other tools have been built with Valgrind.
Try valgrind
Old 10-15-2004, 12:02 PM   #4
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145

Original Poster
Rep: Reputation: 15
thank you very much for your replies


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
GTK multi-threaded application akhil1 Programming 2 01-20-2009 03:59 AM
fork()'ed or multi threaded socket I/O? thedevilsjester Programming 5 09-24-2008 12:41 AM
pthreads - multi-threaded server elitecodex Programming 1 08-20-2005 03:58 PM
how to do waitpid() using a multi-threaded server? Thinking Linux - Software 1 04-13-2005 09:50 PM
Multi-Threaded C pragti Programming 1 06-01-2004 10:50 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:40 PM.

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