|
Home > Archive > Unix Shell > August 2007 > Need help on gdb
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| artikulkarni@gmail.com 2007-08-29, 1:20 pm |
| Hello,
I am getting message "Can't find a default source file"/"Function
"funcname" not defined." etc when i am trying to use the gdb
debugger.
i have already followed the below steps -
g++ -g testfile.cpp
gdb a.out
(gdb) run
working fine
(gdb) break funcname
Function "funcname" not defined
(gdb) break 10
Can't find a default source file
whats going wrong? thanking u.
| |
| Vakayil Thobias 2007-08-30, 1:19 am |
| artikulkarni@gmail.com wrote:
> Hello,
> I am getting message "Can't find a default source file"/"Function
> "funcname" not defined." etc when i am trying to use the gdb
> debugger.
> i have already followed the below steps -
> g++ -g testfile.cpp
> gdb a.out
> (gdb) run
> working fine
> (gdb) break funcname
> Function "funcname" not defined
> (gdb) break 10
> Can't find a default source file
>
> whats going wrong? thanking u.
>
(gdb> list
The above commad has to list the complete program.
Is it working ?
Regards,
Thobias Vakayil
| |
| Billy Patton 2007-08-30, 1:20 pm |
| artikulkarni@gmail.com wrote:
> Hello,
> I am getting message "Can't find a default source file"/"Function
> "funcname" not defined." etc when i am trying to use the gdb
> debugger.
> i have already followed the below steps -
> g++ -g testfile.cpp
> gdb a.out
> (gdb) run
> working fine
> (gdb) break funcname
> Function "funcname" not defined
> (gdb) break 10
> Can't find a default source file
>
> whats going wrong? thanking u.
>
Don't know what the program does, but unless you have it prompting for
some input the 'run' command will run the program to completion. setting
a break point after the run is like closing the barn door after the cow
is out.
My previous use (heavy ) would be
(gdb) break funcname
(gdb) break 10
(gdb) run
You might also try ddd. It is a GUI wrapper of gdb.
|
|
|
|
|