Assume the following .gdbinit :
break foobar ignore 1 1 run
The program starts using gdb --args ./myprogram --argument1 --argument2 , etc.
Now, when I start this, the first time around everything is fine and dandy. However, if I issue run at the prompt (gdb) to restart the program with the last known command line, the ignore line simply does not take effect.
The reason, of course, is clear. The first time I finish
(gdb) info break Num Type Disp Enb Address What 1 breakpoint keep y 0x000000000061ea6a in foobar at ../foobar.c:1173 breakpoint already hit 1 time
And any subsequent start starts with what value is displayed for X in breakpoint already hit X time . Naturally, this value will already exceed the limit set on ignore .
How can I reset the statistics on breakpoints or better yet, how can I get run to do this automatically for me?
source share