putting breakpoint in a file using “rbreak filename.c:.” doesn't work

前端 未结 2 1976
长发绾君心
长发绾君心 2020-12-11 19:07

I want to put breakpoint on all functions of a file. I came across this link : http://sourceware.org/gdb/download/onlinedocs/gdb/Set-Breaks.html#Set-Breaks

It sugges

2条回答
  •  青春惊慌失措
    2020-12-11 19:46

    rbreak filename.cpp:.* works fine for me.

    Note that in order to put breakpoint in a file you need to compile the program with debug info, e.g

    g++ -g filename.cpp
    

提交回复
热议问题