开发者

Problem with gdb while trying to use with an executable

开发者 https://www.devze.com 2023-03-18 02:54 出处:网络
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 functio

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消