LinuxQuestions.org
Visit the LQ Articles and Editorials 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 01-28-2005, 10:15 PM   #1
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Rep: Reputation: 34
/root/init.c: No File or Directory in GDB


Hi

I can not debug my programs because something has gone wrong with gdb:

I compile a file called mheap.cpp, which has only uses iostream.h, and algorithm.h, it compiles fine.
when I run gdb and set a break point at line 108, which is the main procedure it says

No line 108 in file "init.c".


when I fireup ddd and load the executable it says:
"/root/init.c: No File or Directory"


I never had a file init.c in root, whats wrong?
 
Old 01-28-2005, 10:27 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Just a shot in the dark, but did you remember to compile with the debugging option ( -g )?
 
Old 01-28-2005, 11:17 PM   #3
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Original Poster
Rep: Reputation: 34
Quote:
Just a shot in the dark, but did you remember to compile with the debugging option ( -g )?
dead accurate shot! yeap that solved the problem, how stupid of me to forget -r
 
  


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
growisofs only can create file under DVD root directory? bravehao Linux - Newbie 1 10-17-2005 12:02 PM
normal gdb and spec gdb for kgdb Igor007 Linux - Newbie 1 09-23-2005 01:41 PM
get root shell with gdb Musikolo Linux - Security 1 02-15-2005 04:06 PM
wine: cannot open /root/.wine : No such file or directory shams Mandriva 2 06-13-2004 08:03 PM
Download file into directory as root? guitarnix Linux - Newbie 3 09-17-2003 08:55 AM


All times are GMT -5. The time now is 03:20 PM.

Main Menu
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