Possible Duplicate:
Debugging using gdb - Best practices
I have just one .cpp
file and I compile it with g++ on ubuntu terminal.
Then when I call gdb myProgram
, I get no debugging symbols found
.
I need to step through the code, to debug it. I don't know how to make it work.
I know how to use gdb
, but not sure how to compile my .cpp
file so that it has debug information for gdb to use.
You need to compile with the -g
flag. See here: