Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / gdb / Breakpoint-Menus.html
blob4e3193b95e86f11cde70d2e86ab573f519be6372
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="Breakpoint%20Menus">Breakpoint Menus</a>,
13 Next:<a rel="next" accesskey="n" href="Error-in-Breakpoints.html#Error%20in%20Breakpoints">Error in Breakpoints</a>,
14 Previous:<a rel="previous" accesskey="p" href="Break-Commands.html#Break%20Commands">Break Commands</a>,
15 Up:<a rel="up" accesskey="u" href="Breakpoints.html#Breakpoints">Breakpoints</a>
16 <hr><br>
17 </div>
19 <h4 class="subsection">Breakpoint menus</h4>
21 <p>Some programming languages (notably C<tt>++</tt>) permit a single function name
22 to be defined several times, for application in different contexts.
23 This is called <dfn>overloading</dfn>. When a function name is overloaded,
24 <code>break </code><var>function</var><code></code> is not enough to tell GDB where you want
25 a breakpoint. If you realize this is a problem, you can use
26 something like <code>break </code><var>function</var><code>(</code><var>types</var><code>)</code> to specify which
27 particular version of the function you want. Otherwise, GDB offers
28 you a menu of numbered choices for different possible breakpoints, and
29 waits for your selection with the prompt <code>&gt;</code>. The first two
30 options are always <code>[0] cancel</code> and <code>[1] all</code>. Typing <kbd>1</kbd>
31 sets a breakpoint at each definition of <var>function</var>, and typing
32 <kbd>0</kbd> aborts the <code>break</code> command without setting any new
33 breakpoints.
35 <p>For example, the following session excerpt shows an attempt to set a
36 breakpoint at the overloaded symbol <code>String::after</code>.
37 We choose three particular definitions of that function name:
39 <pre class="smallexample"> (gdb) b String::after
40 [0] cancel
41 [1] all
42 [2] file:String.cc; line number:867
43 [3] file:String.cc; line number:860
44 [4] file:String.cc; line number:875
45 [5] file:String.cc; line number:853
46 [6] file:String.cc; line number:846
47 [7] file:String.cc; line number:735
48 &gt; 2 4 6
49 Breakpoint 1 at 0xb26c: file String.cc, line 867.
50 Breakpoint 2 at 0xb344: file String.cc, line 875.
51 Breakpoint 3 at 0xafcc: file String.cc, line 846.
52 Multiple breakpoints were set.
53 Use the "delete" command to delete unwanted
54 breakpoints.
55 (gdb)
56 </pre>
58 </body></html>