When a breakpoint is defined, it is enabled by default. When the debugger starts or resumes process execution, it first adapts the process so that it can detect when the given events occur. A breakpoint can be disabled so it is not involved in determining when the process should next stop. A breakpoint that is no longer required can be deleted entirely.
disable_breakpoint_command
| disable breakpoint_number_expression ,...
enable_breakpoint_command
| enable breakpoint_number_expression ,...
delete_breakpoint_command
| delete breakpoint_number_expression ,...
disable_breakpoint_command
: disable [ breakpoints ] [ bpnums ]
| dis [ breakpoints ] [ bpnums ]
enable_breakpoint_command
: enable [ breakpoints ] [ bpnums ]
delete_breakpoint_command
: delete [ breakpoints ] [ bpnums ]
| d [ breakpoints ] [ bpnums ]
bpnums
: bpnum ...
bpnum
: integer
You can specify one or more breakpoint numbers to disable, enable or delete. If you do not specify any arguments, the debugger disables, enables or deletes all the breakpoints.
For example:
(idb) disable 1
(idb) status
#1 PC==0x08052e0f in int main(void) "src/x_list.cxx":182 { stop } Disabled
#2 PC==0x0804c55e in void List<Node>::append(class Node* const) "src/x_list.cxx":148 { break }
#3 Access memory (write) 0xbfffc188 to 0xbfffc18b { stop }
(idb) disable 10 - 8,1 + 1 + 1
(idb) status
#1 PC==0x08052e0f in int main(void) "src/x_list.cxx":182 { stop } Disabled
#2 PC==0x0804c55e in void List<Node>::append(class Node* const) "src/x_list.cxx":148 { break } Disabled
#3 Access memory (write) 0xbfffc188 to 0xbfffc18b { stop } Disabled
(idb) delete 1
(idb) status
#2 PC==0x0804c55e in void List<Node>::append(class Node* const) "src/x_list.cxx":148 { break } Disabled
#3 Access memory (write) 0xbfffc188 to 0xbfffc18b { stop } Disabled
(idb) enable all
(idb) status
#2 PC==0x0804c55e in void List<Node>::append(class Node* const) "src/x_list.cxx":148 { break }
#3 Access memory (write) 0xbfffc188 to 0xbfffc18b { stop }
(idb) disable 1
(idb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep n 0x0804b1c3 in main at src/x_list.cxx:182
breakpoint already hit 1 time(s)
2 breakpoint keep y 0x0804f20a in List<Node>::append(Node * const) at src/x_list.cxx:148
breakpoint already hit 1 time(s)
3 watchpoint keep y _firstNode
(idb) disable 2,3
(idb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep n 0x0804b1c3 in main at src/x_list.cxx:182
breakpoint already hit 1 time(s)
2 breakpoint keep n 0x0804f20a in List<Node>::append(Node * const) at src/x_list.cxx:148
breakpoint already hit 1 time(s)
3 watchpoint keep n _firstNode
(idb) delete 1
(idb) info breakpoints
Num Type Disp Enb Address What
2 breakpoint keep n 0x0804f20a in List<Node>::append(Node * const) at src/x_list.cxx:148
breakpoint already hit 1 time(s)
3 watchpoint keep n _firstNode
(idb) enable
(idb) info breakpoints
Num Type Disp Enb Address What
2 breakpoint keep y 0x0804f20a in List<Node>::append(Node * const) at src/x_list.cxx:148
breakpoint already hit 1 time(s)
3 watchpoint keep y _firstNode