Problem with gdb while trying to use with an executable
I have an executable that was built in Qt. When I try to use the command, "gdb my_executable", I am able to set breakpoint only for the functions that are in the main.cpp file, For all other functions, I get the message,
No source file named filename.cpp Make breakpoint pending on futu开发者_如何学Pythonre shared library load? (y or [n]) n
I even tried giving the full path name but it doesn't work. Could you please help me out.
thanks
Compile all your sources with the -g option. This will include debugging information in your .o files, like information about what the source file name is and what line number corresponds to each instruction.
Compile with -gstabs option if using the gcc toolchain.
精彩评论