Mark English and German manual pages as UTF-8.
[kdbg.git] / kdbg / doc / en / breakptlist.html
blobf80eea7449a355965a9519d93dbb959df5567176
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="Author" content="Johannes Sixt">
6 <title>KDbg - User's Manual - Breakpoint list</title>
7 </head>
8 <body text="#000000" bgcolor="#FFFFFF">
9 <p><a href="index.html">Contents</a></p>
10 <h1>
11 The Breakpoint List</h1>
12 <p>The breakpoint list displays all breakpoints and watchpoints that are set
13 and allows you to manipulate them. It can be displayed using <i>View|Breakpoints</i>.</p>
14 <h2>
15 The list of breakpoints</h2>
16 <p>For each breakpoint the following is shown:</p>
17 <ul>
18 <li>
19 the breakpoint location,</li>
21 <li>
22 the hit count,</li>
24 <li>
25 the ignore count if set,</li>
27 <li>
28 the condition if set.</li>
29 </ul>
30 <p>The icon in front of the entry indicates whether the breakpoint is enabled
31 (a red dot) or disabled (a bright red dot), whether the breakpoint is temporary
32 (a tiny clock is overlaid), whether the breakpoint is conditional (a
33 tiny question mark is overlaid), or whether the breakpoint is <em>orphaned</em>
34 (a 'x' is overlaid).</p>
35 <p>Watchpoints are indicated by an eye glas icon in front of the line.</p>
36 <h2>
37 <A name="orphanedbp"></A>Orphaned breakpoints</h2>
38 <p><em>Orphaned breakpoints</em> are breakpoints that gdb cannot implant
39 immediately. Orphaned breakpoints occur if you try to set a breakpoint in a file
40 that is not part of the executable. In particular, this is the case if the file
41 belongs to a shared library or dynamically loaded module: When the executable
42 is loaded, gdb does not yet know about dynamic modules and, hence, cannot set
43 breakpoints there. However, KDbg does not forget about requests to set
44 breakpoints in dynamic modules: It tries to set orphaned breakpoints each time
45 that the program stops. When the breakpoint can be set successfully, it turns
46 into a normal breakpoint.</p>
47 <p>But there is an important consequence: Orphaned breakpoints are not effective,
48 and the program will <em>not</em> stop there. The remedy is to set a breakpoint
49 in the executable at the earliest possible point after which it is known that
50 the dynamic module is loaded. For shared libraries this is usually in <tt>main()</tt>
51 and for dynamically loaded modules it is after the call to <tt>dlopen()</tt>
52 (or equivalent). When the program stops at this breakpoint the orphaned
53 breakpoints from the dynamic module are set and become effective.</p>
54 <h2>
55 Manipulating breakpoints</h2>
56 <p><a name="StopProg"></a>It is important to note that breakpoints and watchpoints
57 cannot be manipulated while the program is running. If the program has
58 already been started, it must stop first - either by hitting a breakpoint
59 that is already set or forcefully by choosing <i>Execution|Break</i>. Note
60 that this will not terminate the program, it just interrupts it. You can
61 now manipulate the breakpoints; then choose <i>Execution|Continue</i> to
62 let the program continue.</p>
63 <p>To set a breakpoint on a specific source line, it is easiest to do this
64 in the source code window. If you don't know the exact file and line number
65 of a function, you can set the breakpoint by typing the function name in
66 the edit box above the list and click <i>Add Breakpoint</i>.</p>
67 <p>You can disable and enable breakpoints by selecting them in the list
68 and clicking <i>Disable</i> or <i>Enable</i>. Or you simply click on the
69 breakpoint in the list using the middle mouse button - just like you enable
70 and disable breakpoints in the source window.</p>
71 <p>You can set a condition on a breakpoint (so that the program is only
72 stopped if the condition is true) or set an ignore count (so that the program
73 is not stopped the next n times that the breakpoint is hit). To do that,
74 press the <i>Conditional</i> button and enter the condition and/or ignore
75 count.</p>
76 <h2>
77 Manipulating watchpoints</h2>
78 <p>Watchpoints are a like breakpoints, except that they interrupt the program
79 when the value of a memory location changes. As with breakpoints, watchpoints
80 cannot be manipulated while the program is running. See <a href="#StopProg">above</a>
81 for more information.</p>
82 <p>To set a watchpoint, type an expression in the edit box above the list,
83 then click <i>Add Watchpoint</i>. The program will stop when the value
84 of the expression changes. Note that watchpoints that involve local variables
85 can only be set when the program is stopped in a breakpoint (or has been
86 interrupted by <i>Execution|Break</i>).</p>
87 <p>To remove the watchpoint, select it from the list and click <i>Remove</i>.
88 If the expression involves a local variable, the watchpoint will be removed
89 automatically when the program leaves the current frame.</p>
90 <p>You can set a condition and an ignore count on the watchpoint just like
91 on breakpoints by selecting it and clicking <i>Conditional</i>.</p>
92 </body>
93 </html>