OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [gdbtcl/] [help/] [source.html] - Blame information for rev 1767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<HTML>
3
<HEAD>
4
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
5
   <META NAME="GENERATOR" CONTENT="Mozilla/4.06 [en] (X11; I; Linux 2.0.35 i686) [Netscape]">
6
   <TITLE>Source Window Help</TITLE>
7
</HEAD>
8
<BODY>
9
 
10
<CENTER>
11
<H1>The Source Window</H1></CENTER>
12
 
13
<BR>The Source Window is the primary interface between the user and
14
the debugger; it is automatically opened when the debugger starts. The
15
Source Window displays the status of the program, controls execution of
16
the program, and allows visualization of the program execution.
17
 
18
<H3><A HREF="#menus">Menus</A></H3>
19
 
20
<UL>
21
<LI><A HREF="#menus_file">File Menu</A></LI>
22
<LI><A HREF="#menus_run">Run Menu</A></LI>
23
<LI><A HREF="#menus_view">View Menu</A></LI>
24
<LI><A HREF="#menus_control">Control Menu</A></LI>
25
<LI><A HREF="#menus_prefs">Preferences Menu</A></LI>
26
</UL>
27
 
28
<H3><A HREF="#toolbar">Toolbar</A></H3>
29
 
30
<UL>
31
<LI><A HREF="#toolbar_exec">Execution Control Buttons</A></LI>
32
<LI><A HREF="#toolbar_window">Window Buttons</A></LI>
33
<LI><A HREF="#toolbar_frame">Frame Control</A></LI>
34
</UL>
35
 
36
<H3><A HREF="#display">Source Window Display</A></H3>
37
 
38
<UL>
39
<LI><A HREF="#setting_a_breakpoint">Setting a Breakpoint</A></LI>
40
<LI><A HREF="#viewing_breakpoints">Viewing Breakpoints</A></LI>
41
<LI><A HREF="#display_balloon">Variable Balloons</A></LI>
42
<LI><A HREF="#display_popup">Source Pop-up Menus</A></LI>
43
</UL>
44
 
45
<H3><A HREF="#status">Source Window Status Bars</A></H3>
46
 
47
<UL>
48
<LI><A HREF="#status_bar">Program Status Bar</A></LI>
49
<LI><A HREF="#status_mode">Source Display Status Bar</A></LI>
50
</UL>
51
 
52
<H3><A HREF="#search">Search Entry</A></H3>
53
 
54
<HR>
55
<H2><A NAME="menus"></A>Menus</H2>
56
 
57
<IMG SRC="images/src_menu.gif">
58
<H4><A NAME="menus_file"></A>File Menu</H4>
59
 
60
<DL>
61
<DT>Open</DT>
62
<DD>Opens a file selection dialog to select the executable to debug</DD>
63
<DT>Target Settings...</DT>
64
<DD>Opens the <A HREF="target.html">Target Selection Dialog</A> to edit target
65
settings</DD>
66
<DT>Page Setup</DT>
67
<DD>(Windows only) Opens the Windows Page Setup dialog to configure printing</DD>
68
<DT>Print</DT>
69
<DD>(Windows only) Print the contents of the Source Window Display</DD>
70
<DT>Exit</DT>
71
<DD>Exits the debugger</DD>
72
</DL>
73
 
74
<H4><A NAME="menus_run"></A>Run Menu</H4>
75
<DL>
76
<DT>Download</DT>
77
<DD>Initiates download of the executable onto the target via the protocol specified
78
in the <A HREF="target.html">Target Selection Dialog</A></DD>
79
<DT>Run</DT>
80
<DD>Runs or re-runs the program</DD>
81
</DL>
82
 
83
<H4><A NAME="menus_view"></A>View Menu</H4>
84
<DL>
85
<DT>Stack</DT>
86
<DD>Open a <A HREF="stack.html">Stack Window</A></DD>
87
<DT>Registers</DT>
88
<DD>Open a <A HREF="register.html">Register Window</A></DD>
89
<DT>Memory</DT>
90
<DD>Open a <A HREF="memory.html">Memory Window</A></DD>
91
<DT>Watch Expressions</DT>
92
<DD>Open a <A HREF="watch.html">Watch Window</A></DD>
93
<DT>Local Variables</DT>
94
<DD>Open a <A HREF="locals.html">Locals Window</A></DD>
95
<DT>Breakpoints</DT>
96
<DD>Open a <A HREF="breakpoint.html">Breakpoint Window</A></DD>
97
<DT>Console</DT>
98
<DD>Open a <A HREF="console.html">Console Window</A></DD>
99
<DT>Function Browser</DT>
100
<DD>Open a window allowing the user to easily search for functions and
101
set breakpoints.</DD>
102
<DT>Thread List</DT>
103
<DD>Open a window that displays all current threads and allows the user
104
to change active threads</DD>
105
</DL>
106
 
107
<H4><A NAME="menus_control"></A>Control Menu</H4>
108
<DL>
109
<DT><A HREF="#step_button">Step</A></DT>
110
<DD>Step program until it reaches a different source line</DD>
111
<DT><A HREF="#next_button">Next</A></DT>
112
<DD>Step program, proceeding through subroutine calls</DD>
113
<DT><A HREF="#finish_button">Finish</A></DT>
114
<DD>Execute until the current stack frame returns</DD>
115
<DT><A HREF="#continue_button">Continue</A></DT>
116
<DD>Continue program being debugged, after signal or breakpoint</DD>
117
<DT><A HREF="#stepi_button">Step Asm Inst</A></DT>
118
<DD>Step one instruction exactly</DD>
119
<DT><A HREF="#nexti_button">Next Asm Inst</A></DT>
120
<DD>Step one instruction, but proceed through subroutine calls</DD>
121
<DT>Automatic Step</DT>
122
<DD>Automatically step the program every two seconds</DD>
123
</DL>
124
 
125
<H4><A NAME="menus_prefs"></A>Preferences Menu</H4>
126
<DL>
127
<DT>Global</DT>
128
<DD>Opens the <A HREF="gbl_pref.html">Global Preferences Dialog</A> and allows
129
editing of global settings</DD>
130
<DT>Source</DT>
131
<DD>Opens the <A HREF="src_pref.html">Source Preferences Dialog</A> and allows
132
editing of Source Window settings</DD>
133
</DL>
134
 
135
<HR>
136
 
137
<H2><A NAME="toolbar"></A>Toolbar</H2>
138
<IMG SRC="images/src_toolbar.gif">
139
The Source Window toolbar consists of three functional sections: execution
140
control buttons, debugger window buttons, and stack frame control buttons.
141
 
142
<BR>
143
<H4><A NAME="toolbar_exec"></A>Execution Control Buttons</H4>
144
These convenience buttons provide on-screen access to the most important
145
debugger execution control functions:
146
<DL>
147
<DT><A NAME="run_button"></A><IMG SRC="../images/run.gif"> or
148
<IMG SRC="../images2/run.gif"> Run </DT>
149
<DD>The Run Button will start execution of the program, including target selection
150
and downloading, if necessary. If the program is already running, the Run
151
Button will start the program from the beginning (re-run it).</DD>
152
 
153
<DT><A NAME="stop_button"></A><IMG SRC="../images/stop.gif"> or
154
<IMG SRC="../images2/stop.gif"> Stop</DT>
155
<DD>The Stop Button will interrupt execution of the program (provided this
156
feature is supported by the underlying debugging protocol and hardware)
157
or cancel downloads. It is also used as an indication that the debugger
158
is busy.</DD>
159
<DT><A NAME="step_button"></A><IMG SRC="../images/step.gif"> or <IMG SRC="../images2/step.gif">Step</DT>
160
<DD>Step the program until it reaches a different source line</DD>
161
<DT><A NAME="next_button"></A><IMG SRC="../images/next.gif"> or <IMG SRC="../images2/next.gif">Next</DT>
162
<DD>Step the program, proceeding through subroutine calls</DD>
163
<DT><A NAME="finish_button"></A><IMG SRC="../images/finish.gif"> or <IMG SRC="../images2/finish.gif"> Finish</DT>
164
<DD>Execute until the current stack frame returns</DD>
165
<DT><A NAME="continue_button"></A><IMG SRC="../images/continue.gif"> or <IMG SRC="../images2/continue.gif"> Continue</DT>
166
<DD>Continue the program being debugged, after signal or breakpoint</DD>
167
<DT><A NAME="stepi_button"></A><IMG SRC="../images/stepi.gif"> or <IMG SRC="../images2/stepi.gif"> Step Asm Inst</DT>
168
<DD>Step one instruction exactly. This function is only available when the
169
Source Window is displaying assembler code.</DD>
170
<DT><A NAME="nexti_button"></A><IMG SRC="../images/nexti.gif"> or <IMG SRC="../images2/nexti.gif"> Next Asm Inst</DT>
171
<DD>Step one instruction, but proceed through subroutine calls. This function
172
is only available when the Source Window is displaying assembler code.</DD>
173
</DL>
174
 
175
<H4>
176
<A NAME="toolbar_window"></A>Window Buttons</H4>
177
The Debugger Window buttons give instant access to the Debugger's auxiliary
178
windows:
179
<DL>
180
<DT><A NAME="register_button"></A><IMG SRC="../images/reg.gif"> or <IMG SRC="../images2/reg.gif"> Registers</DT>
181
<DD>Open a <A HREF="register.html">Register Window</A></DD>
182
<DT><A NAME="memory_button"></A><IMG SRC="../images/memory.gif"> or <IMG SRC="../images2/memory.gif"> Memory</DT>
183
<DD>Open a <A HREF="memory.html">Memory Window</A></DD>
184
<DT><A NAME="stack_button"></A><IMG SRC="../images/stack.gif"> or <IMG SRC="../images2/stack.gif"> Stack</DT>
185
<DD>Open a <A HREF="stack.html">Stack Window</A></DD>
186
<DT><A NAME="watch_button"></A><IMG SRC="../images/watch.gif"> or <IMG SRC="../images2/watch.gif"> Watch Expressions</DT>
187
<DD>Open a <A HREF="watch.html">Watch Window</A></DD>
188
<DT><A NAME="locals_button"></A><IMG SRC="../images/vars.gif"> or <IMG SRC="../images2/vars.gif"> Local Variables</DT>
189
<DD>Open a <A HREF="locals.html">Locals Window</A></DD>
190
<DT><A NAME="breakpoints_button"></A><IMG SRC="../images/bp.gif"> or <IMG SRC="../images2/bp.gif"> Breakpoints</DT>
191
<DD>Open a <A HREF="breakpoint.html">Breakpoint Window</A></DD>
192
<DT><A NAME="console_button"></A><IMG SRC="../images/console.gif"> or <IMG SRC="../images2/console.gif"> Console</DT>
193
<DD>Open a <A HREF="console.html">Console Window</A></DD>
194
</DL>
195
 
196
<H4><A NAME="toolbar_frame"></A>Frame Control</H4>
197
The Frame Control area of the toolbar displays information about the PC
198
of the current frame, and the frame control buttons may be used to navigate
199
through the call stack. Whenever any of these buttons are used, both the
200
Source Window Display and the <A HREF="stack.html">Stack Window</A> will
201
show the selected frame.
202
<DL>
203
<DT><IMG SRC="images/frame_info.gif" > Frame Information Display</DT>
204
<DD>The left half of the frame information display shows the value of the PC
205
in the current frame. The right half shows the line number of the PC in
206
the source file, if available.</DD>
207
 
208
<DT><A NAME="up_button"></A><IMG SRC="../images/up.gif"> or <IMG SRC="../images2/up.gif"> Up</DT>
209
<DD>Select and view the stack frame that called this one</DD>
210
 
211
<DT><A NAME="down_button"></A><IMG SRC="../images/down.gif"> or <IMG SRC="../images2/down.gif"> Down</DT>
212
<DD>Select and view the stack frame called by this one</DD>
213
 
214
<DT><A NAME="bottom_button"></A><IMG SRC="../images/bottom.gif"> or <IMG SRC="../images2/bottom.gif"> Bottom</DT>
215
<DD>Select and view the bottom-most stack frame</DD>
216
</DL>
217
 
218
<HR>
219
 
220
<H2><A NAME="display"></A>Source Display</H2>
221
The Source Display is used for many things: browsing source code, setting
222
and clearing breakpoints, and a few other special functions. Executable
223
lines (those for which executable code was generated by the compiler) are
224
denoted with a marker (a dash, "-") in the first column of the display.
225
<P>The debugger highlights the PC in the current frame in either green,
226
indicating that the PC is in the bottom-most frame (i.e., it is being executed)
227
or gold, indicating that the PC is contained in a frame that is not currently
228
executing (because it has called another function). A blue highlight is
229
used by the debugger to indicate a browsing position: the PC is contained
230
in a frame that is not executing or on the call stack. All highlight colors
231
are user selectable in the <A HREF="src_pref.html">Source Preferences</A>.
232
 
233
<BR>
234
<H4><A NAME="setting_a_breakpoint"></A>Setting a Breakpoint</H4>
235
Moving the mouse pointer over the "hot spot" of an executable line will
236
change the mouse cursor to a large dot. Clicking the left mouse button
237
will then toggle a breakpoint at this line. If no breakpoint exists, one
238
will be installed and the dash in the left margin will change into a red
239
breakdot. If a breakpoint exists, it will be removed and the red breakdot
240
will revert back to a dash. The executable line marker shows the status
241
of each line: an empty marker (the dash) indicates that no breakpoints
242
are set at the line. A colored breakdot indicates that a breakpoint exists
243
at the line (see <A HREF="#display_popup">Source Pop-up Menus</A> for more
244
information on setting different types of breakpoints and their representations
245
in the Source Display).
246
<P>Black breakdots in the Source Window display indicate that the breakpoint
247
has been disabled. To re-enable the breakpoint, click the enable/disable
248
checkbox in the Breakpoint Window (see <A HREF="breakpoint.html#display_state">
249
Enabling/Disabling Breakpoints</A>).
250
 
251
<BR>
252
<H4><A NAME="viewing_breakpoints"></A>Viewing Breakpoints</H4>
253
You can find out more information about a breakpoint by moving the cursor
254
over a breakpoint.  A balloon window will pop up with additional information.
255
To get a list of all the active breakpoints, you will need to open a
256
<A HREF="breakpoint.html">breakpoint window</A>.
257
<IMG SRC="images/src_bp_bal.gif">
258
 
259
<BR>
260
<H4><A NAME="display_balloon"></A>Variable Balloons</H4>
261
If the program to be debugged has started and is stopped, the display
262
will show the value of variables in variable
263
balloons. To activate a variable balloon, simply hold the mouse cursor
264
over the name of a variable in the Source Display for a second or two:
265
the debugger displays the name of the variable, its type, and its value
266
in a pop-up balloon.
267
<IMG SRC="images/src_bal.gif">
268
 
269
<BR>
270
<H4><A NAME="display_popup"></A>Source Pop-up Menus</H4>
271
The Source Display has two pop-up menus. One is activated by clicking the
272
right mouse button when the mouse cursor is over an executable line marker's
273
hot spot. This pop-up menu looks like this:
274
<P><IMG SRC="images/src_bpop.gif">
275
<DL>
276
<DT>Continue to Here</DT>
277
<DD>Continue program execution until it reaches this point. All breakpoints
278
will be ignored.  Be aware that if the program never executes the line you selected,
279
it will run until completion.</DD>
280
<DT>Set Breakpoint</DT>
281
<DD>Set a breakpoint at this line. This has the same effect as left clicking
282
on this line. Breakpoints are shown as red breakdots in the Source Window
283
Display.</DD>
284
<DT>Set Temporary Breakpoint</DT>
285
<DD>Set a temporary breakpoint at this line. Temporary breakpoints are shown
286
as orange breakdots in the Source Window Display. The remove themselves automatically
287
the first time they are hit.</DD>
288
<A NAME="thread_bp"></A>
289
<DT>Set Breakpoint on Thread(s)...</DT>
290
<DD>GDB allows the user to set a breakpoint on a particular thread or threads. This
291
menu item will display a dialog with a list of threads.  The user can select a list
292
of threads that will have breakpoints set at the selected line number.  A warning
293
will be displayed if there are no active threads.</DD>
294
<IMG SRC="images/src_thread.gif">
295
</DL>
296
 
297
The other pop-up menu is activated by clicking the right mouse button anywhere
298
else in the Source Display. It is only available when a variable or number
299
in the display lies below the mouse cursor or is selected (by clicking
300
the left mouse button and dragging the mouse to highlight the variable/number).
301
The pop-up menu looks like this:
302
<P><IMG SRC="images/src_pop.gif">
303
<DL>
304
<DT><A NAME="add_to_watch"></A>Add <I>expr</I> to Watch</DT>
305
<DD>Adds the selected expression to the <A HREF="watch.html">Watch Window</A>,
306
opening it, if necessary.</DD>
307
<DT>Dump Memory at <I>expr</I></DT>
308
<DD>Opens a new <A HREF="memory.html">Memory Window</A> at the selected expression.
309
If the expression is a variable, then the Memory Window is opened with
310
memory addresses starting at the value of the variable.</DD>
311
<DT>Open Another SOurce Window</DT>
312
<DD>GDB allows multiple source windows to co-exist. You can, for example, have
313
one window in source mode and one in assembly mode.  Or you can use one window
314
to browse the stack or other files.</DD>
315
</DL>
316
 
317
<H4><A NAME="status"></A>Source Window Status Bars</H4>
318
The Source Window has two status bars which inform the user of the status
319
of the program (the "status bar") and the status of the Source Window.
320
<P>The&nbsp;<A NAME="status_bar"></A>Program Status Bar (or simply "Status
321
Bar") displays the status of the program. Common messages seen here include:
322
<DL>
323
<DT>No program loaded.</DT>
324
<DD>No program has been loaded into target memory.</DD>
325
<DT>Program is ready to run.</DT>
326
<DD>A program has been loaded into target memory and may be executed. Start
327
the program by hitting <A HREF="#run_button">Run</A>.</DD>
328
<DT>Program stopped at <I>line/address</I></DT>
329
<DD>The program stopped at line <I>line</I> or address <I>address</I>. Execution
330
may continue by hitting any of the <A HREF="#toolbar_exec">execution control
331
buttons</A> on the toolbar.</DD>
332
<DT>Program terminated. 'Run' will restart.</DT>
333
<DD>The program exited. Pressing <A HREF="#run_button">Run</A> will restart
334
it.</DD>
335
</DL>
336
 
337
The Status Bar also displays some help information. For instance, the Status
338
Bar will show the function of a button on the toolbar or the Source Display
339
Status Bar as well as any keyboard shortcut for any button in the Source
340
Window.
341
 
342
<BR>
343
<H4><A NAME="status_mode"></A>Source Display Status Bar</H4>
344
<IMG SRC="images/src_stat.gif">
345
The Source Display Status Bar shows the current state of the Source Window:
346
the name of the file displayed in the Display, the name of the function
347
in the Display which contains the PC for the current frame (if any), and
348
the display mode.
349
<P>The <A NAME="file_selector"></A>Source File Selector is a dropdown
350
menu which contains the names of all the files that were compiled into
351
the program being debugged.
352
<P>Normally, the File Selector displays the name of the file currently
353
being viewed, but any file from the dropdown menu may be selected for browsing.
354
Simply select the file to view from the available choices (or type it directly
355
into the File Selector) and the Source Window will load that file into
356
the Display. To return to the PC of the program, simply press the
357
<A HREF="#bottom_button">Bottom
358
Frame Control Button</A>.
359
<P>The <A NAME="function_selector"></A>Source Function Selector displays
360
the name of the function containing the Source Window's PC, if one exists,
361
but it may be used to browse any function in the current file. Simply type
362
the name of the desired function into the Function Selector or select it
363
from the dropdown menu. The Source Window's PC is updated to point at this
364
function. To return to the PC of the program, simply press the
365
<A HREF="#bottom_button">Bottom
366
Frame Control Button</A>.
367
<P>The <A NAME="mode_selector"></A>Source Display Mode Selector displays
368
the viewing mode of the current file/function shown in the Source Window
369
Display.
370
<P>The function of the "step" keyboard shortcut will differ depending on
371
the mode the Source Window Display. "Stepping" in Source Mode (or in the
372
Source Pane of SRC+ASM Mode) will cause a source-level step. "Stepping"
373
in Assembly or Mixed Mode (or in the Assembly Pane of the SRC+ASM Mode)
374
will cause the debugger to step exactly one machine instruction. This also
375
applies to the shortcut for "next".
376
<P>The Display Mode Selector may be used to change the view of the current
377
source file. The available display modes are
378
<DL>
379
<DT>SOURCE</DT>
380
<DD>The contents of the Display are shown as source code. If source code is
381
not available (either because no debugging information is available or
382
the source file is not found), the Source Window will temporarily set the Display
383
Mode to "ASSEMBLY".</DD>
384
<DT>ASSEMBLY</DT>
385
<DD>A disassembly of the target's memory is shown in the Display. Even assembly
386
source files show a disassembly of target memory; to see the assembly source
387
code, use the SOURCE mode. Note that the debugger can only display assembly
388
code on a function-by-function basis. It cannot display all the instructions
389
generated from a single source file.</DD>
390
<DT>MIXED</DT>
391
<DD>The Display shows source code mixed with the assembler instructions which
392
were generated for those lines by the compiler for the current function.
393
Note that the addresses of the assembly lines is not necessarily monotonically
394
increasing. If the source file associated with the function cannot be found,
395
the Source Window will revert to ASSEMBLY mode.</DD>
396
<DT>SRC+ASM</DT>
397
<DD>The Source Window Display is divided into two panes: an assembly pane and
398
a source pane. Breakpoints may be set/cleared in either pane.</DD>
399
</DL>
400
 
401
<HR>
402
 
403
<H2><A NAME="search"></A>Search Entry</H2>
404
The Search Entry facilitates searching for text in the Source Window Display.
405
Simply enter the text to be found into the Search Entry and press the Enter
406
key on the keyboard to search forwards in the Source Window Display (hold
407
down the Shift key to search backwards). If a match is found, it is highlighted
408
in the Source Window and the Program Status Bar displays information about
409
where the match was found.
410
<P>The Search Entry can also jump the Source Window to a specific line.
411
Enter the line number preceded by an "at" sign (@) into the Search Entry
412
and press enter. If entered line number is greater than the total number
413
of lines in the Source Window Display, the Display will jump to the end
414
of the current file.
415
</BODY>
416
</HTML>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.