LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 09-23-2004, 11:54 AM   #1
sibtay
Member
 
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, 06:00 AM   #2
anoop_cv
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, 12:34 PM   #3
n3tw0rk
Member
 
Registered: Sep 2003
Location: Rawalpindi, Pakistan
Distribution: Slackware
Posts: 86

Rep: Reputation: 15
Quote:
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

http://valgrind.kde.org/
 
Old 10-15-2004, 01:02 PM   #4
sibtay
Member
 
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145

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


Reply


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


All times are GMT -5. The time now is 12:35 PM.

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