LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-25-2005, 04:40 AM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
debuggers for c + threads


Hi i have recently installed gdb and ddd debugger.... I need to debug my program that all the time returns segmentation fault
My problem is that i dont know how to debug a program with multple files and with multiple threads.. I think the segmentaion fault occurs when the threads exhcange data between them... I will need something that can read concurrently lot of sources and let me put inside some breakpoints...
Can u help me with this ?
 
Old 07-25-2005, 12:17 PM   #2
AngryLlama
Member
 
Registered: Sep 2004
Location: /dev/urandom
Distribution: Gentoo
Posts: 171

Rep: Reputation: 31
make sure your program has been compiled with the -ggdb flag

run ddd ./your_program

Then goto File/Open Source

It should present a list of source files used in your program.
Choose the one in question.

Go to the line you would like to set your breakpoint at and right-click on the margin.

Choose Set Breakpoint.

Click the Run button.

This is pretty self explainatory I believe.
 
Old 07-26-2005, 03:54 AM   #3
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
Thx a lot for your help I ll try it and i ll ask u again
 
  


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
Java threads listed using kill -3 does not contain all threads found using ps -auxww coneheed Programming 2 11-14-2005 08:57 AM
Experience with code debuggers? R00ts Programming 3 05-18-2005 08:01 AM
Java Threads vs Native Threads rjmendez Programming 0 08-16-2004 05:58 AM
kernel debuggers? rohan208 Programming 1 07-15-2004 03:59 PM
Linux debuggers itsguru Programming 7 06-22-2004 03:01 PM

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

All times are GMT -5. The time now is 04:21 AM.

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