Supported on windows
Supported on linux
Supported on embedded
Supported on android

info breakpoints command

Displays information about breakpoints.

Syntax

info breakpoints
info breakpoints [Number]
info breakpoints [Number]
info breakpoints [Number1] [Number2] ... [NumberN]

Parameters

Number
When the info breakpoints command is invoked without any arguments, it displays information about all breakpoints. When one or more numbers are specified, only the breakpoints matching the specified numbers will be displayed.

Columns

Num
Specifies the breakpoint number that can be used as an argument to enable, disable, delete and condition commands.
Type
Specifies the type of the breakpoint. Breakpoint corresponds to a code breakpoint. Watchpoint corresponds to a data breakpoint.
Disp
Specifies what happens to the breakpoint when it gets hit. Keep means that the breakpoint will not be removed. Del means that the breakpoint will be deleted after the first hit. Dis means that it will be disabled after the first hit.
Address
Specifies the address where the breakpoint was set. A value of <PENDING> means GDB could not find any code corresponding to the specified location and thus could not set the breakpoint immediately. GDB tries to resolve the pending breakpoints each time it loads new symbols (that provide clues on what the address can be), e.g. when a new shared library is loaded.

Examples

In this example we will set a few breakpoints in different modes and show how the info breakpoints command displays various information about them.

(gdb) break main
Breakpoint 1 at 0x80483ed: file test.cpp, line 5.
(gdb) break 6
Breakpoint 2 at 0x80483f7: file test.cpp, line 6.
(gdb) tbreak 7
Temporary breakpoint 3 at 0x804841c: file test.cpp, line 7.
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x080483ed in main() at test.cpp:5
2 breakpoint keep y 0x080483f7 in main() at test.cpp:6
3 breakpoint del y 0x0804841c in main() at test.cpp:7
(gdb) run
Starting program: /home/testuser/test
Breakpoint 1, main () at test.cpp:5
5 for (int i = 0; i < 5; i++)
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x080483ed in main() at test.cpp:5
breakpoint already hit 1 time
2 breakpoint keep y 0x080483f7 in main() at test.cpp:6
3 breakpoint del y 0x0804841c in main() at test.cpp:7
(gdb) continue
Continuing.
Breakpoint 2, main () at test.cpp:6
6 printf("%di);
(gdb) continue
Continuing.
0
Breakpoint 2, main () at test.cpp:6
6 printf("%di);
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x080483ed in main() at test.cpp:5
breakpoint already hit 1 time
2 breakpoint keep y 0x080483f7 in main() at test.cpp:6
breakpoint already hit 2 times
3 breakpoint del y 0x0804841c in main() at test.cpp:7
(gdb) disable 2
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x080483ed in main() at test.cpp:5
breakpoint already hit 1 time
2 breakpoint keep n 0x080483f7 in main() at test.cpp:6
breakpoint already hit 2 times
3 breakpoint del y 0x0804841c in main() at test.cpp:7
(gdb) continue
Continuing.
1
2
3
4
Temporary breakpoint 3, main () at test.cpp:7
7 return 0;
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x080483ed in main() at test.cpp:5
breakpoint already hit 1 time
2 breakpoint keep n 0x080483f7 in main() at test.cpp:6
breakpoint already hit 2 times
(gdb) continue
Continuing.
[Inferior 1 (process 26331) exited normally]

Compatibility with VisualGDB

Normally you do not need to run the info breakpoints command under VisualGDB. Please use the Breakpoints window in Visual Studio instead.

See also