LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-14-2008, 04:02 AM   #1
smartgupta
Member
 
Registered: Sep 2008
Posts: 81

Rep: Reputation: 15
gdb: problem while debug an executable file


I created one file (test.cpp)and complied it and get the executable file(test) and run it.It is giving the out put but when I am trying to debug that executable.I am getting the error --


Quote:
(gdb) test
Undefined command: "test". Try "help".
please tell me the solutions??

Thanks in advance .....
 
Old 10-14-2008, 04:07 AM   #2
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 121

Rep: Reputation: 21
When you run the command from the command line, it automatically runs the executable. But in the command mode, you have to manually running the executable by giving the following command.
Quote:
(gdb)run test

Last edited by milindlokde; 10-14-2008 at 04:14 AM.
 
Old 10-16-2008, 04:51 AM   #3
abhijeetmirjolkar
LQ Newbie
 
Registered: Oct 2007
Posts: 8

Rep: Reputation: 0
have you used "-g" while compiling the .cpp file ?
 
  


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
gdb: missing the seperate debug info file vikhr Linux - Software 1 05-16-2008 01:08 AM
How to debug without having debug section in an executable ? unclesam Linux - Newbie 0 02-02-2006 06:23 AM
how can I debug the interactinve program with GDB bigapple Programming 1 08-03-2005 09:55 PM
Using gdb to debug different arhitectures george_mercury Linux - Software 1 01-07-2005 06:19 PM
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 09:59 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