If I have a breakpoint that has the number 8 for example. If I want this breakpoint to be disabled after it is hit, I write the following in commands 8:
disable 8
end
If I delete a breakpoint whose number is less than 8, then saved the breakpoints in a file before exiting gdb, the reopen gdb and restore the breakpoints file, the number of breakpoint 8 will change and its commands will disable the wrong breakpoint.
Is there a variable that I can use so that a breakpoint's command can disable itself? I mean some variable like $bpnum