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 08-25-2009, 04:41 AM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Rep: Reputation: 43
debug library source in GDB/DDD


Hi all is there a way to debug my library files from DDD? Basically a way to pass the paths to DDD so I can view the source etc. I'm having a segmentation nightmare, which only crops up about every 10 or so starts, I know it's in one file in a library. I could move the source file into my general code to debug, but am sure there's a way in DDD. Help please
 
Old 08-25-2009, 02:24 PM   #2
jvhiii
LQ Newbie
 
Registered: Aug 2007
Posts: 7

Rep: Reputation: 1
Assuming that you have the source, let's say at /usr/src/libfoo,
in GDB do:

dir /usr/src/libfoo

It's probably more complicated than that, and partly depends upon the message that GDB/DDD is giving you. That message should indicate the path to the source file that it is looking for, and you may have to match that up with the source file's actual location on your filesystem to figure out what argument to give the GDB/DDD "dir" command.
"dir" takes a colon-separated list of pathnames, if you need it.

-John
 
  


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
Debug using gdb and gdbserver Hachaso Programming 0 06-05-2009 03:56 PM
cannot debug with gdb ufmale Programming 9 04-27-2009 05:21 PM
hello how debug the kernel with ddd? mjalalynia Linux - Software 1 08-27-2008 04:57 AM
how debug kernel with ddd? how debug the kernel with ddd? mjalalynia Linux - Kernel 2 08-25-2008 06:50 AM
how to debug multithread using GDB? ryanux Programming 1 05-11-2004 12:58 AM

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

All times are GMT -5. The time now is 06:15 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