LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 10: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, 05: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, 11:34 AM   #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, 12: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



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:39 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
Open Source Consulting | Domain Registration