Go to the first, previous, next, last section, table of contents.


The Application Can Have Its Own Breakpoints

The GDB breakpoint commands were written with a strong presumption that all breakpoints are managed by a human user. Therefore, the command language contains commands like `delete' which affect all breakpoints without discrimination.

In libgdb, there is added support for breakpoints and watchpoints which are set by the application and which should not be affected by ordinary, indiscriminate commands. These are called protected breakpoints.

Debugger Command: break-protected ...
Debugger Command: watch-protected ...
These work like break and watch except that the resulting breakpoint is given a negative number. Negative numbered breakpoints do not appear in the output of info breakpoints but do in that of info all-breakpoints. Negative numbered breakpoints are not affected by commands which ordinarily affect `all' breakpoints (e.g. delete with no arguments).

Note that libgdb itself creates protected breakpoints, so programs should not rely on being able to allocate particular protected breakpoint numbers for themselves.

More than one breakpoint may be set at a given location. Libgdb adds the concept of priority to breakpoints. A priority is an integer, assigned to each breakpoint. When a breakpoint is reached, the conditions of all breakpoints at the same location are evaluated in order of ascending priority. When breakpoint commands are executed, they are also executed in ascending priority (until all have been executed, an error occurs, or one set of commands continues the target).

Debugger Command: priority n bplist
Set the priority for breakpoints bplist to n. By default, breakpoints are assigned a priority of zero.


Go to the first, previous, next, last section, table of contents.