Breakpoints and Watchpoints
-
break
[file:]line
-
Set breakpoint at line in file. E.g. "
break main.c:37
"
-
break
[file:]function
-
Set breakpoint at function in file. E.g. "
break main.c:calc
"
-
break
+offset
-
Set breakpoint at offset lines from current stop.
-
break
-offset
-
Set breakpoint at offset lines before current stop.
-
break
+addr
-
Set breakpoint at address addr.
-
break
+offset
-
Set breakpoint at next instruction.
-
break ... if
expr
-
Break conditionally on non-zero expression.
-
cond
n [expr]
-
New conditional expression on breakpoint n; make unconditional if no expr.
-
tbreak
[[filename:]lineno | function]
-
Temporary breakpoint; disable when reached. With a lineno argument, set a break there in the current file. With a function argument, set a break at the first executable statement within that function. The line number may be prefixed with a filename and a colon, to specify a breakpoint in another file.
-
rbreak
regexp
-
Break on all functions matching regexp.
-
watch
expr
-
Set a watchpoint for expression expr.
-
catch
x
-
Break at C++ handler for exception x.
-
info break
-
Show defined breakpoints.
-
info watch
-
Show defined watchpoints.
-
clear
-
Delete breakpoints at next instruction.
-
clear
[file:]function
-
Delete breakpoints on entry to function.
-
clear
[file:]line
-
Delete breakpoints on source line line.
-
delete
[n]
-
Delete breakpoints [or breakpoint n].
-
disable
[n]
-
Disable breakpoints [or breakpoint n].
-
enable once
[n]
-
Enable breakpoints [or breakpoint n]; disable when reached.
-
enable del
[n]
-
Enable breakpoints [or breakpoint n]; delete when reached.
-
ignore
n count
-
Ignore breakpoint n count times.