Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / info / gdb / Disabling.html
blobe3bf0ed24c1c2b0aa8ff1093673c9241a172aa2d
1 <html lang="en">
2 <head>
3 <title>Debugging with GDB</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="Debugging with GDB">
6 <meta name="generator" content="makeinfo 4.3">
7 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Disabling">Disabling</a>,
13 Next:<a rel="next" accesskey="n" href="Conditions.html#Conditions">Conditions</a>,
14 Previous:<a rel="previous" accesskey="p" href="Delete-Breaks.html#Delete%20Breaks">Delete Breaks</a>,
15 Up:<a rel="up" accesskey="u" href="Breakpoints.html#Breakpoints">Breakpoints</a>
16 <hr><br>
17 </div>
19 <h4 class="subsection">Disabling breakpoints</h4>
21 <p>Rather than deleting a breakpoint, watchpoint, or catchpoint, you might
22 prefer to <dfn>disable</dfn> it. This makes the breakpoint inoperative as if
23 it had been deleted, but remembers the information on the breakpoint so
24 that you can <dfn>enable</dfn> it again later.
26 <p>You disable and enable breakpoints, watchpoints, and catchpoints with
27 the <code>enable</code> and <code>disable</code> commands, optionally specifying one
28 or more breakpoint numbers as arguments. Use <code>info break</code> or
29 <code>info watch</code> to print a list of breakpoints, watchpoints, and
30 catchpoints if you do not know which numbers to use.
32 <p>A breakpoint, watchpoint, or catchpoint can have any of four different
33 states of enablement:
35 <ul>
36 <li>Enabled. The breakpoint stops your program. A breakpoint set
37 with the <code>break</code> command starts out in this state.
38 <li>Disabled. The breakpoint has no effect on your program.
39 <li>Enabled once. The breakpoint stops your program, but then becomes
40 disabled.
41 <li>Enabled for deletion. The breakpoint stops your program, but
42 immediately after it does so it is deleted permanently. A breakpoint
43 set with the <code>tbreak</code> command starts out in this state.
44 </ul>
46 <p>You can use the following commands to enable or disable breakpoints,
47 watchpoints, and catchpoints:
49 <dl>
50 <dt><code>disable </code>[<code>breakpoints</code>]<code> </code>[<code></code><var>range</var><code>...</code>]<code></code>
51 <dd>Disable the specified breakpoints--or all breakpoints, if none are
52 listed. A disabled breakpoint has no effect but is not forgotten. All
53 options such as ignore-counts, conditions and commands are remembered in
54 case the breakpoint is enabled again later. You may abbreviate
55 <code>disable</code> as <code>dis</code>.
57 <br><dt><code>enable </code>[<code>breakpoints</code>]<code> </code>[<code></code><var>range</var><code>...</code>]<code></code>
58 <dd>Enable the specified breakpoints (or all defined breakpoints). They
59 become effective once again in stopping your program.
61 <br><dt><code>enable </code>[<code>breakpoints</code>]<code> once </code><var>range</var><code>...</code>
62 <dd>Enable the specified breakpoints temporarily. GDB disables any
63 of these breakpoints immediately after stopping your program.
65 <br><dt><code>enable </code>[<code>breakpoints</code>]<code> delete </code><var>range</var><code>...</code>
66 <dd>Enable the specified breakpoints to work once, then die. GDB
67 deletes any of these breakpoints as soon as your program stops there.
68 </dl>
70 <p>Except for a breakpoint set with <code>tbreak</code> (see <a href="Set-Breaks.html#Set%20Breaks">Setting breakpoints</a>), breakpoints that you set are initially enabled;
71 subsequently, they become disabled or enabled only when you use one of
72 the commands above. (The command <code>until</code> can set and delete a
73 breakpoint of its own, but it does not change the state of your other
74 breakpoints; see <a href="Continuing-and-Stepping.html#Continuing%20and%20Stepping">Continuing and stepping</a>.)
76 </body></html>