OverviewThe Source Window is the primary interface between the user and the debugger; it is automatically opened when the debugger starts. The Source Window displays the status of the trace experiment, controls navigation of the trace buffer, and allows visualization of the program execution.Source Window topics:
Toolbar
The Source Window toolbar consists of three functional sections: trace
control buttons, debugger window buttons, and stack frame control buttons.
Tracing Control Buttons These convenience buttons provide on-screen access to the most important debugger tracing control functions:
Window Buttons The Debugger Window buttons give instant access to the Debugger's auxillary windows:
Frame Control The Frame Control area of the toolbar displays information about the PC of the current frame, and the frame control buttons may be used to navigate through the call stack. Whenever any of these buttons are used, both the Source Window Display and the Stack Window will show the selected frame. In order to use the Stack Window in tracing mode, the stack pointer must be collected.
Source Display The Source Display is used for many things: browsing source code, setting, editing, and deleting tracepoints, and a few other special functions. Executable lines (those for which executable code was generated by the compiler) are denoted with a marker (a dash, "-") in the first column of the display. The debugger highlights the PC in the current frame in either green, indicating that the PC is in the current tracepoint, or gold, indicating that the PC is contained in a frame that is not the current tracepoint, i.e., as part of a stack backtrace. A blue highlight is used by the debugger to indicate a browsing position. All highlight colors are user-selectable in the Source Preferences. Setting a Tracepoint Moving the mouse pointer over the "hot spot" of an executable line will change the mouse cursor to a large dot. Clicking the left mouse button will then allow tracepoint to be inserted at this line. If no tracepoint exists, the Add Tracepoint Dialog will appear. If a tracepoint is installed, the dash in the left margin will change into a magenta breakdot. If a tracepoint exists, the Edit Tracepoint Dialog appears, allowing either modification of the tracepoint or deletion of the tracepoint. If the tracepoint is deleted, the breakdot will revert to a dash. The executable line marker shows the status of each line: an empty marker (the dash) indicates that no tracepoint is set at the line. A colored breakdot indicates that a tracepoint exists at the line. The display will attempt to show the value of variables in variable balloons. To activate a variable balloon, simply hold the mouse cursor over the name of a variable in the Source Display for a second or two: the debugger displays the name of the variable, its type, and its value in a pop-up balloon. If the variable was not collected, the Variable Balloon will show a memory-access error. Source Pop-up Menus The Source Display has two pop-up menus. One is activated by clicking the right mouse button when the mouse cursor is over an executable line marker's hot spot. This pop-up menu provides access to:
The other pop-up menu is activated by clicking the right mouse button anywhere else in the Source Display. It is only available when a variable or number in the display lies below the mouse cursor or is selected (by clicking the left mouse button and dragging the mouse to highlight the variable/number). The pop-up menu allows users to:
Source Window Status Bars The Source Window has two status bars which inform the user of the status of the program (the "status bar") and the status of the Source Window.The Program Status Bar (or simply "Status Bar") displays the status of the program. Common messages seen here include:
The Status Bar also displays some help information. For instance, the Status Bar will show the function of a button on the toolbar or the Source Display Status Bar as well as any keyboard shortcut for this button. Source Display Status Bar current state of the Source Window: the name of the file displayed in the Display, the name of the function in the Display which contains the PC for the current frame (if any), and the display mode.The Source File Selector is a dropdown menu which contains the names of all the files that were compiled into the program being debugged. Normally, the File Selector displays the name of the file currently being viewed, but any file from the dropdown menu may be selected for browsing. Simply select the file to view from the available choices (or type it directly into the File Selector) and the Source Window will load that file into the Display. To return to the current tracepoint, simply press the Bottom Frame Control Button. The Source Function Selector displays the name of the function containing the Source Window's PC, if one exists, but it may be used to browse any function in the current file. Simply type the name of the desired function into the Function Selector or select it from the dropdown menu. The Source Window's PC is updated to point at this function. To return to the current tracepoint, simply press the Bottom Frame Control Button. The Source Display Mode Selector displays the viewing mode of the current file/function shown in the Source Window Display. The Display Mode Selector may be used to change the view of the current source file. The available display modes are
Search Entry The Search Entry facilitates searching for text in the Source Window Display. Simply enter the text to be found into the Search Entry and press the Enter key on the keyboard to search forwards in the Source Window Display (hold down ths Shift key to search backwards). If a match is found, it is highlighted in the Source Window and the Program Status Bar displays information about where the match was found. The Search Entry can also jump the Source Window to a specific line. Enter the line number preceeded by an at-sign (@) into the Search Entry and press enter. If entered line number is greater than the total number of lines in the Source Window Display, the Display will jump to the end of the current file. |