开发者

How can save breakpoint setting in linux consol while debugging a c++ program

I am now using linux developing c++ program. the workbench is windows connecting linux workstation console through putty. I set lot of breakpoint in the program, using gdb to debug program 开发者_JAVA技巧is very powerful:) But I do not no how to save breakpoint, so the next time when "gdb ./MyProg" the breakpoint information is lost,“info breakpoint” show no breakpoint, It puzzled me lot of day. Can anybody give some advice? Thanks first.


According to the GDB Manual, you can use the command:

save breakpoints <file>

To save them to , and then:

source <file>

To load them.

If the break points are not yet loaded, you may want to tell gdb to allow loading those breakpoints later.

set breakpoint pending on


On similar lines,

you can log all gdb inputs into a file and can see.

You can enable log using 'set logging on [filename]'. If file name is not mentioned, then default filename - gdb.txt is taken.

Debug Log might be useful when you want to share gdb trace details

If you do not want to log, disable log using 'set logging off'

--Cheers

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜