August 2011
Intermediate to advanced
552 pages
23h 48m
English
Use break to set a breakpoint. You can break on a function name, or you can give a filename:line specification to stop in a specific place.
Breakpoints can have conditions attached to them:
(gdb) break memerror.m:74 if argc != 2
Breakpoint 1 at 0x1d1c: file memerror.m, line 74.
This breakpoint will only be triggered if argc is not 2. You can also attach conditions after the breakpoint has been created using the cond command. You specify the condition using the syntax of whatever language you are debugging. If you are debugging an Ada or a FORTRAN program, you would use the logical syntax of those languages.
(gdb) cond 2 (argc ...Read now
Unlock full access