LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   gdb: problem while debug an executable file (https://www.linuxquestions.org/questions/programming-9/gdb-problem-while-debug-an-executable-file-676210/)

smartgupta 10-14-2008 04:02 AM

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 .....

milindlokde 10-14-2008 04:07 AM

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

abhijeetmirjolkar 10-16-2008 04:51 AM

have you used "-g" while compiling the .cpp file ?


All times are GMT -5. The time now is 03:46 AM.