tags:

views:

22

answers:

2

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 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.

+1  A: 

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

save breakpoints <file>

To save them to , and then:

source <file>

To load them.

Matias Valdenegro
but when I set the breakpoints and save breakpoints, system echoed with " warning: save-tracepoints: no tracepoints to save" why even I have set and hit the breakpoints? and what is the tracepoint means? thans for your help first!
parsifal
sounds like first entering "set logging on" then can use " source <file> " to load the breakpoints
parsifal
A: 

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

Koteswara sarma
it sounds good:) thanks friend.
parsifal