This chapter describes the function of each window, menu, and display in the Debugger's graphical user interface and describes the commands available on the Debugger command line (see “Debugger Command Line”).
This chapter contains the following sections:
The major areas of the Main View window are shown in Figure A-1.
The Main View window contains a menu bar, from which you can perform a number of actions and launch windows. The menu bar contains the following menus, which are discussed in detail in later pages:
The Main View window also contains several input fields, a source code display area, and buttons that trigger commonly used actions.
The Main View window contains the following items:
| Command text field | |||
Displays full pathname of the executable file that you are currently debugging, including any run-time arguments. | |||
| Debug button | |||
Allows you to toggle among various modes. Right-click on the Debug button to display the State Indicator menu where the following mode choices are available:
| |||
| Stay Focused/Follow Interesting button | |||
If the lock icon is locked, it indicates that the focus of Main View will attempt to stay focused on this thread. If the lock is unlocked, the debugger will follow the interesting thread. This means it will focus on threads that reach a user breakpoint. | |||
| All/Single button | |||
If set to All, the Cont , Stop, Step, Next, and Return actions apply to all processor or threads. If set to Single, then only the currently focused process or thread will be acted upon. For more information about multiprocess and pthreaded programs, refer to Chapter 10, “Multiple Process Debugging”. | |||
| Cont button | |||
Continues execution of the current process or all processes in the program. When you click on the Cont button, the program runs either to a breakpoint exception or to termination. This button is active only after the running process(es) has stopped. If the program has not been run or has been killed, the Cont button is grayed out. If the target program has not yet started executing, use the Run button to start execution. | |||
| Stop button | |||
Stops execution of the current running process(es). This button is valid only when a process(es) is running; otherwise the button is grayed out. Traps can also be set to stop the program at a specific location or on a particular condition. | |||
| Step button | |||
Executes the code involving a single source line of the current process. If a function is encountered in the source line, or is the source line is a subroutine call, the process will step into a function or subroutine call and stop at the first executable line in the function or subroutine. The Next button can be used to continue to the next source line in the current file. If a trap is encountered while executing the step into command, the process is stopped where the trap was fired. The Step button is active only after the running process(es) has stopped; otherwise the button is grayed out. When you right-click on the Step button, a menu pops up to allow you to choose the number of source lines to be stepped. If you choose the N menu entry, a dialog window is opened to allow you to enter a step value. | |||
| Next button | |||
Executes the code involving a single source line of the current process. The current process continues to the next source line in the current file, and does not count any statements in functions that may be encountered in the source line. If the source line is a subrouting call, the process will stop at the next source line in the current file. The Step button can be used to step into a function or subroutine call and stop at the first executable line in the function or subroutine. If a trap is encountered while executing the step over command, the process is stopped where the trap was fired. The Next button is active only after the running process(es) has stopped; otherwise the button is grayed out. When you right-click on the Next button, a menu pops up to allow you to choose the number of source lines to be stepped. If you choose the N menu entry, a dialog window is opened to allow you to enter a step value. | |||
| Return button | |||
Continues execution of the process until the current function being executed returns. The process is stopped immediately upon returning to the calling function. All code within the current function is executed as usual. If a breakpoint is encountered, the action is canceled and the process is stopped where the breakpoint was fired. You can use this button only after the running process(es) has stopped; otherwise the button is grayed out. This action is not allowed if the executable is instrumented for performance analysis.
| |||
| Sample button | |||
Allows you to collect process state data to be used by the Performance Analyzer for program evaluation. You can use this button only when the process(es) is running and the Enable Data Collection mode is set on the Performance panel; otherwise the button is grayed out. See ProDev Workshop: Performance Analyzer User's Guide for more information. | |||
| Print button | |||
Prints, in the Source View window, the value of any highlighted text, or the source pane of the Main View window. | |||
| Kill button | |||
Kills the currently running process or all running processes in your debug session by sending the process(es) the equivalent of a kill -9 signal. You can use this button if the process(es) is running or stopped; otherwise the button is grayed out. | |||
| Run button | |||
Runs the program that you are currently debugging or all programs. After the initial run, allows you to rerun the program(s) while maintaining any breakpoints and command line arguments you have set. | |||
| Status area | |||
Displays information about the process that you are debugging, such as process id, thread id, function name, list of arguments, location of the PC, and so forth, | |||
| Source Code area | |||
Displays the source code for the program that you are currently debugging. | |||
| Annotation column | |||
Clicking in this area displays information specific to a line number, such as breakpoints, location of the PC, and so forth. | |||
| File text field | |||
Displays the name of the file shown in the source code area. | |||
| Command line area | |||
Area of the Main View window where you can enter Debugger commands and view line-mode debugger message, and in which Debugger messages are displayed. | |||
| Show/Hide annotations button | |||
This button (see Figure A-2) is visible only when you run or load a performance experiment (see the ProDev Workshop: Performance Analyzer User's Guide for more information on the performance tools). This is a toggle button that shows or hides performance related annotations. | |||
The Admin menu in the Main View window performs administrative and general management tasks dealing with processes, windows, and user preferences. The Admin menu provides the following selections:
| Library Search Path | |
Controls where the Debugger looks for DSOs when you invoke the Debugger on an executable or core file. The Library Search Path dialog allows you to reset the LD_LIBRARY_PATH and _RLD_ROOT environment variables. You can also reset _RLD_LIST to control the set of DSOs that will be used by the program. See the rld(1) man page for more information on these variables. Any changes you make to these variables are propagated into Execution View when you run the program. There are two ways to open this dialog. First, select Admin -> Library Search Path from the Main View window menu bar, or the Library Search Path dialog opens automatically if you invoke the Debugger on an executable or core file and it is unable to find all of the required DSOs. In this case, an annotated list of required DSOs displays at the top of the dialog box with such status messages as OK, Error: Cannot find library, or Error: Core file and library mismatch (which indicates that the Debugger found a DSO that did not match the core file). Below this list are three to nine fields in which you can modify the value of the corresponding named environment variable. | |
| Remap Path | |
Opens a dialog that allows you to enter a new pathname. | |
| Multiprocess View | |
Displays the Multiprocess View window, which allows you to control processes and threads. You should note that if you exit from Multiprocess View, you will exit from your debugging session. More additional information about Multiprocess View, refer to “Multiprocess View”. | |
| GLdebug | |
Provides a toggle to turn on GLdebug. GLdebug is a graphical software tool for debugging application programs that use the IRIS Graphics Library (GL). GLdebug locates programming errors in executables when GL calls are used incorrectly. | |
| Attach/Switch Process | |
Changes the current process or attaches to a process. You will be queried for the new process ID. You can select one from the list of items presented, type one in or paste one in from another window. Switching processes changes the session. | |
| Load/Switch to Executable | |
Changes the current executable or loads an executable. This option also allows you to debug a different core file. | |
| Detach | |
Releases the process from the Debugger. This allows you to make changes to the source code. You must detach the process before you recompile the program. | |
| Load Settings | |
Allows you to use the previously saved preference settings from a file you choose in the Load Settings dialog. | |
| Save Settings | |
Allows you to save the current preference settings to an initialization file used when the Debugger is first started, or any file you choose through this dialog. These can include such items as window sizes, current views, window configurations, and so on. | |
| Iconify | |
| Raise | |
Brings all session view windows to the foreground and displays any iconified windows. | |
| Launch Tool | |
Allows you to run other WorkShop tools. You can switch to the other tools by selecting Build Analyzer, Static Analyzer, Performance Analyzer, or Tester. Selecting Debugger allows you to start another debugging session. If you have ProDev ProMP (formerly called WorkShop Pro MPF) installed on your system, the Parallel Analyzer selection is also available. | |
| Close | |
Closes the Main View window. | |
| Exit | |
Closes all views in the session and terminates the session. | |
The Views menu in Main View window provides the following selections for viewing the process(es) and their corresponding data:
The Query menu allows you to perform some of the queries available in the Static Analyzer. These queries are convenient if you have previously built a cvstatic fileset. However, if you need to build the fileset from scratch, the process becomes more involved. For complete information about using the Static Analyzer, see the ProDev Workshop: Static Analyzer User's Guide and the cvstatic(1) man page.
With a current fileset, you can double-click any defined entity in the source code, select the Where Defined? option from the submenu appropriate to its type, and the source code display area will scroll to the location where the item is defined.
The Source menu in the Main View window provides the following selections to manage source code files:
The Display menu in the Main View window provides the following selections to annotate the displayed source code:
| Show Line Numbers/Hide Line Numbers | |
Displays or hides line numbers in the annotation column corresponding to the source code. | |
| Show Toolbar | |
Allows you to choose the format type for the toolbar. The options are Text Only, Icons Only, or Icons and Text. Text Only was the only format for the toolbar prior to release 2.9. Icons Only and Icons and Text are options which display icon options for more visual debugging. | |
| Show Tooltips/Hide Tooltips | |
This menu item enables or disables the context sensitive pop-up help option. Some of the key menu items, buttons, and data entry areas have pop-up help statements attached to them to give the user hints on what to use them for or how to use them. | |
| Preferences | |
Displays the Annotations Preferences dialog box, which allows you to show or hide column annotations and menus specific to the different WorkShop tools. If you have purchased ProDev ProMP, you can display and manipulate loop indicators. The Performance toggle displays experiment statistics. The Tester module allows you to see coverage statistics. Turning off the Performance toggle deletes the performance annotations from the Source View . | |
| Hide Icons/Show Icons | |
Hides or displays the annotation column, which is located to the left of the source code display area. | |
The Perf (Performance) menu (see Figure A-3) includes the following menu selections:
| Select Task submenu | |
Allows you to choose the task for your performance analysis. The choices available are shown in Figure A-3. You may select only one task per performance analysis run. If none of the given tasks satisfy your requirements, you can choose Custom, which brings up the configuration dialog open to the General tab. From here, you can design your own task requirements. | |
| Examine Results | |
Launches the Performance Analyzer. For complete information about the Performance Analyzer, see the ProDev Workshop: Performance Analyzer User's Guide. | |
| Configs | |
Brings up the configuration dialog open to the Runtime tab as shown in Figure A-3. The dialog opens with the Experiment Directory text field filled in with a default value. The Performance Analyzer provides a default directory named test0000. If you use the default or any other name that ends in four digits, the four digits are used as a counter and will be incremented automatically for each subsequent experiment. | |
The Traps menu (see Figure 5-1) offers the Set Trap and Clear Trap submenus and the Group Trap Default and Stop All Default menu options.
The Set Trap submenu offers submenus for managing breakpoints and sample points. The following submenu selections are available:
| Stop | |
Sets a breakpoint at a designated line in your source code. To set a breakpoint at a line displayed in the Main View or Source View windows:
The preferred method for setting a breakpoint is to click in the annotations area of the Main View window, across from the line at which you want to set the breakpoint. | |
| Stop At Function Entry | |
Sets a breakpoint at the beginning of a function. To set a breakpoint at a function, click on the function name in the source code display area and select the Set Trap submenu, then choose the Stop At Function Entry option. | |
| Stop At Function Exit | |
Sets a breakpoint at the end of a function. To set a breakpoint at a function exit, click on the function name in the source code display area and select the Set Trap submenu, then choose the Stop At Function Exit option. | |
| Sample | |
Sets a sample trap at a line displayed in the Main View or Source View windows. To set a sample trap:
| |
| Sample At Function Entry | |
Sets a sample trap at the beginning of a function. To set the sample trap, highlight the function name in the source code display area, then pull down the Set Trap submenu and select the Sample At Function Entry option. | |
| Sample At Function Exit | |
Sets a sample trap at the end of a function. To set the sample trap, highlight the function name in the source code display area, then pull down the Set Trap submenu and select the Sample At Function Exit option. | |
The Clear Trap submenu contains selections that allow you to delete a trap on the line containing the cursor. You must designate Stop or Sample trap type, since both types can exist at the same location, appearing superimposed on each other. The following submenu selections are available:
The last two menu options allow you to specify the following items:
| Group Trap Default | |
Interacts with Source View. If set to true, all subsequent Source View trap requests will be group traps. That is, all members of the process group will apply this trap. This option is the same as typing stop pgrp in filename from the command line. Default is false unless you are using IRIX 6.5 pthreads, when the implied setting is always true. | |
| Stop All Default | |
Interacts with Source View. If set to true, all subsequent Source View trap requests will apply the Stop All command to the trap. That is, whenever this trap is encountered, all other members of the process group also will be stopped. This option is the same as typing stop all in filename from the command line. Default is false unless you are using IRIX 6.5 pthreads, when the implied setting is always true. | |
If both of the default options are set to true, it is the same as typing stop all pgrp in filename from the command line.
The PC (program counter) menu in the Main View window provides the following selections for controlling the execution of a process:
| Continue To | |
Continues the process to the selected point in the program unless some other event interrupts. Select a line by clicking on it. The process must be stopped before you can use Continue To. | |
| Jump To | |
Goes directly to a selected point within the same function, jumping over intervening code. Then the Debugger waits for a command to resume execution. Select a line by clicking on it. | |
The Fix+Continue menu offers the following menu selections:
| Edit | |
Allows you to edit text using the Debugger editor. | |
| External Edit | |
Allows you to edit text by using an external editor. The default editor is vi, but can be changed by using the Set Edit Tool pop-up menu in the Admin menu of the Status window. See “Fix+Continue Status Window”, for further information. | |
| Parse and Load | |
Compiles your modified program and loads it for execution. You can execute the modified program by clicking on the Run or Continue buttons in the Main View window. | |
| Show Difference submenu | |
Allows you to see the difference between the original code and your modifications. See “Show Difference Submenu”, for further information. | |
| Edited<-->Compiled | |
Enables or disables your changes. This switch allows you to see how your application executed before and after the changes you made. | |
| Save As | |
Allows you to save your changes to a file. You can save changes to the current source file (the default) or to a separate file. | |
| Save All Files | |
Launches the Save File+Fixes As dialog that allows you to update the current session and save all the modifications. | |
| View submenu | |
Allows you to change to different views. Fix+Continue supports status, message, and build environment windows. See “View Submenu”, for further information. | |
| Preferences submenu | |
Allows you to set your Fix+Continue preferences. See “Preferences Submenu”, for further information. | |
| Cancel Edit | |
Takes you out of edit mode and cancels any changes you have made. | |
| Delete Edits | |
Deletes any modifications that you made. | |
This submenu allows you to view differences between your original and your modified code. It contains the following options:
| For Function | |
Opens a window that shows you the differences between the original source and your modified source. | |
| For File | |
Opens a window that shows you the differences between the original source file and your modified version. | |
| Set Diff Tool | |
Launches the Fix+Continue Preferences Dialog that allows you to set the tool that displays code differences. The default is xdiff(1). For further information on the Fix+Continue Preferences Dialog, see “Preferences Submenu”. | |
This submenu allows you to open different Fix+Continue view windows. It contains the following options:
| Status Window | |
Launches the Fix+Continue Status window. See “Fix+Continue Status Window”, for more information. | |
| Message Window | |
Launches the Fix+Continue Message window. See “Fix+Continue Error Messages Window”, for more information. | |
| Build Environment Window | |
Launches the Fix+Continue Build Environment window. See “Fix+Continue Build Environment Window”, for more information. | |
This submenu allows you to set various options for the Fix+Continue environment, such as the difference tool, the external editor command, and so on. The menu contains the following options:
| Show Preferences | |
Launches the Fix+Continue Preference Dialog that displays preferences currently enabled for the session, and allows you to change the settings. The following preferences are available through the dialog:
| |
| Reset To Factory Defaults | |
Sets preferences to the installed defaults. | |
| Save Preferences | |
Brings up the File dialog that allows you to save your preferences to a file. | |
| Load Preferences | |
Brings up the File dialog that allows you to load preferences from a file. | |
Use the accelerators in Table A-1 to issue Fix+Continue commands directly from the keyboard. The accelerators are listed alphabetically by command.
Table A-1. Fix+Continue Keyboard Accelerators
Command | Key Sequence |
|---|---|
Cancel Edit | Alt+Ctrl+q |
Edit | Alt+Ctrl+e |
Parse And Load | Alt+Ctrl+x |
The Help menu provides the following options:
| Click for Help | |
Provides information on the selected window or menu. | |
| Overview | |
Provides general information on the current tool. | |
| Index | |
Displays the entire list of help topics, alphabetically, hierarchically, or graphically. | |
| Keys & Shortcuts | |
Lists the keys and shortcuts for the current tool. | |
| Product Information | |
Provides copyright and version number information on the tool. | |
This section discusses some of the additional views available through the Debugger: the Execution View, Multiprocess View, Source View, and Process Meter.
The Execution View window is a simple shell that allows you to set environment variables and inspect error messages. If your program is designed to be interactive using standard I/O, this interaction will take place in the Execution View window. Any standard I/O that is not redirected by your Target command is displayed in the Execution View window. Execution View is launched (and iconified) automatically with the Debugger.
WorkShop supports debugging of multiprocess applications, including pthreaded programs and processes spawned with either fork or sproc commands.
Multiprocess debugging is supported primarily through the Multiprocess View window. To display this window, select Multiprocess View from the Admin menu of the Main View window. Multiprocess View displays a hierarchical view of your pthreaded application. Pthreaded processes are marked with a folder icon. Clicking the folder changes the view to show that process's pthreads. Clicking on a thread opens a call stack for that thread.
For each process or thread, clicking the right mouse button brings up a menu that applies to the selected item. This menu is a duplicate of the Process menu. See “Controlling Multiple Processes” for more information.
When the Multiprocess View window comes up, it lists the status of all processes in the process group. This view includes the following information:
| PID | Shows the process identifier (PID). |
| PPID | Lists the parent process PIDs. |
| Status/State | Shows Status or State depending on how you have set your preferences on the Multiprocess View Preferences menu, brought up by selecting Preferences from the Config menu. Status is user-level status and State is the kernel-level status. |
| Name | Identifies the process by file name. |
| Function/PC | Indicates the current function and program counter (PC) for any stopped processes. |
The following Status and State conditions are possible:
The Multiprocess View window uses the same control buttons as are in the Main View window with following exceptions:
There are no Run, Return, or Print buttons in the Multiprocess View.
The buttons in this view apply to all processes as a group.
Using a control button in the Multiprocess View window has the same effect as clicking the button in each process's Main View window.
These buttons operate identically to those described for the Main View window, “Main View Window”, with the All option effect. Refer to that section for descriptions of these buttons.
The Admin menu in the Multiprocess View window lets you perform several administrative functions. Only the Save as Text, Close, and Exit items are described here. All other options perform as those found in the Admin menu of the Main View window, described in “Admin Menu”.
The Preferences option in the Config menu brings up the Multiprocess View Preferences dialog that allows you to control when processes are added to the group and specifies their behavior. This option also contains a Save option that allows you to save your preferences.
The Multiprocess View preference options are:
| Stack Depth | |
Allows you to set how many lines of the call stack should be displayed when opening the call stack. Default is 10. | |
| Levels to open | |
Allows you to specify the number of levels of hierarchy to be displayed. For pthreaded programs, you can display information by program, threads, and callstack. For non-pthreaded programs, you can display information by process and callstack. Default is one level. | |
| Attach to forked processes | |
Automatically attaches new processes spawned by the fork command to the group. (Note that processes spawned by sproc are always attached.) Default is off. | |
| Copy traps to forked processes | |
Copies traps you have set in the parent process to new forked processes automatically. Alternatively, if you create parent traps with Trap Manager and specify pgrp, then the children inherit these traps automatically, regardless of the state of this flag. Default is off. | |
| Copy traps to sproc'd processes | |
Copies traps you have set in the parent process to new sproc'd processes automatically. As in the previous option, if you create parent traps with the Trap Manager and specify pgrp, the children inherit these traps automatically, whether this flag is set or not. Default is on. | |
| Resume parent after fork | |
Restarts the parent process automatically when a child is forked. Default is on. | |
| Resume child after attach on fork | |
Restarts the new forked process automatically when it is attached. If this option is left off, a new process will stop as soon as it is attached. Default is on. | |
| Resume parent after sproc | |
Restarts the parent process automatically when a child is sproc'd. Default is on. | |
| Resume child after attach on sproc | |
Restarts the new sproc'd process automatically when it is attached. If this option is left off, a new process will stop as soon as it is attached. Default is on. | |
| Combine threads at same location | |
Applies a collapsing algorithm to display threads stopped at the same location at the same time. (It is possible for threads to arrive at the same location through different logical routes.) Default is on. | |
| Show Thread Status vs Thread State | |
Displays thread status, which is the user-level status as opposed to showing thread state, which is the kernel-level status. Default is status. | |
| Show/Hide Buttons | |
When this option is ON, the Continue All, Stop All, Step Into All, Step Over All, Sample All, and Kill All buttons appear near the top of the Multiprocess View window. | |
| Show/Hide Header Information | |
When this option is ON, column headings display above the list of processes/threads. | |
The Source View window is brought by choosing Views -> Source View from the Main View window menu bar. By default, a copy of the source on display in the Main View window source pane is displayed in this window.
The Source View menu bar contains selections duplicated from the Main View window: Display, Traps, PC, and Fix+Continue . Each of these menus has the same functionality as its counterpart in the Main View window (see “Main View”). The only new menu selection is the File menu described below:
| Open | ||
Launches the Open dialog that allows you to choose a file to load into Source View. | ||
| Save | ||
Records changes made to the file during the current debugging session. You must first select Make Editable from this File menu when the file is read only. | ||
| Save As | ||
Records changes made during the debugging session to the source file under a different file name, the name of which you can enter or select using the Save As Text dialog. | ||
| Save As Text | ||
Records information in the display area as a text file, the name of which you can enter or select using the Save As Text dialog. | ||
| Open Separate | ||
Launches the Open Separate dialog that allows you to create a new Source View with the contents of a different source file. | ||
| Insert File | ||
Inserts the text of a file within your current file. This item description is available only if the file is editable. The Make Editable item description from this File menu can be used to switch the file from read only. | ||
| Clone | ||
Clones the current window. | ||
| Fork Editor | ||
Starts your default editor on the current file. The default editor is determined by the editorCommand resource in the app-defaults file. The value of this resource defaults to wsh -c vi +%d, which means run vi in a wsh window and scroll to the current line. If the editor allows you to specify a starting line, enter %d in the resource to indicate the new line number. | ||
| Recompile | ||
Displays the Build View window that allows you to compile the source code associated with the current executable. | ||
| Make Editable | ||
Toggles the source code displayed between (Read Only) and (Editable) so that you can edit your code. | ||
| Search | ||
Searches for a literal case-sensitive, literal case-insensitive, or regular expression. After you have set your target and clicked Apply (or pressed Enter), each instance is marked by a search target indicator in the scroll bar. You can search forward or backward in the file by clicking the Next or the Prev button. You can also click an indicator with the middle mouse button to scroll to that point. Clicking Reset removes the search target indicators. | ||
| Go To Line | ||
Launches the Go To Line dialog that allows you to go to a specific line in the source. You can type in the line, or select the line number via the slider bar. | ||
| Versioning | ||
Provides access to the configuration management tool, if you have designated one. The cvconfig script allows you to designate ClearCase, RCS or SCCS. Type the following:
You must have root permissions to run cvconfig . Selecting any option displays a shell in which you can access the configuration management tool. The selections in the submenu are: | ||
| Versioning submenu | ||
Contains the following options:
| ||
| Close | ||
Dismisses the Source View window. | ||
The Process Meter window is brought up by choosing Views -> Process Meter from the Main View menu bar. The Process Meter monitors resource usage of a running process without saving the data. Figure A-6, shows the Process Meter in its default configuration (with only the User Time and Sys Time fields active).
The Process Meter contains its own menu bar that contains the Admin, Charts, Scale, and Help menus. The Admin menu is the same as that described in “Admin Menu”. The Help menu is the same as that described in “Help Menu”. The other menus are described in the following sections.
The Charts menu contains a set of toggles that allow you to choose which charts are displayed in the Process Meter window. You can display as many charts simultaneously as you wish. The following choices are available:
| User/Sys Time (the default) |
| Major/Minor Faults |
| Context Switches |
| Bytes Read/Written |
| Read/Write Sys Calls |
| Other Sys Calls |
| Total Sys Calls |
| Signals |
| Process Size |
The Process menu allows you to control processes and threads.
The Process menu has the following options:
| Change focus to this entry | |
Opens a dialog that allows you to switch the process or thread currently focused on in the Main View window to the process or thread selected in the Multiprocess View window. Selecting a call stack entry changes the Main View window's focus to that process or thread and positions the cvmain window at the offset of the selected call stack. | |
| Create a new window | |
Brings up a new Main View window for the selected process or thread. | |
| Goto | |
Opens a dialog box that allows you to enter the name of a thread on which focus should be switched. This is useful when multiple threads, all at the same location, are collapsed into a single line. While Change focus to this entry always takes you to the first thread, Goto allows you to jump to any thread. | |
| Add | |
Opens a dialog in which you can select from a list of process ids. Selecting a process id (PID) in the dialog and pressing OK will cause the process to be attached and added into the Multiprocess View window's list of processes. | |
| Remove | |
After you select a process/thread (by highlighting it), click on Remove to remove it from the list of processes in the Multiprocess View window. A process in a sproc share group cannot be removed from the process group. | |
This section discusses the Task View and Exception View windows that are specific to Ada code.
Select Views -> Task View from the Main View window menu bar to call up the Task View window. The Task View window is an Ada-specific view that provides you with task and call stack information. If you do not have Ada installed on your system, the Task View menu option of the Views menu is grayed out.
The Task View menu bar contains the Admin, Config, Layout, Display, and Help menus. The Help menu is the same as that described in “Help Menu”. Other menus are described in the following sections.
The Admin menu contains the following options:
| Active | |
This toggle activates the current window in a set of cloned windows. | |
| Clone | |
Creates a clone of the current window. This action is not supported in the current release, and the option is grayed out. | |
| Save As Text | |
Launches the Save Text dialog. This dialog allows you to save your current session as text in a file you designate. | |
| Close | |
Closes the current window. | |
The Config menu contains the following item:
| Preferences | |
Launches the Task View Preference dialog that allows you to set maximum call stack depth shown in Task View . Default depth is 32 frames. | |
The Layout menu contains the following toggles:
| Task List | |
Causes only the CallStack View to be shown. | |
| Single Task | |
Causes only the Process Display to be shown. | |
The Display menu is divided into the Task List Format and Callstack Format sections. The Task List Format toggle buttons control which buttons appear in the toggle sort list, as well as what information is displayed in the Process Display area. The Callstack Format toggles control the amount of information to be displayed in the Callstack Display area of theTask View window.
The Task View Display menu contains the following toggles:
| Thread/task | |
Displays thread/task number. This toggle is active by default. | |
| Status | |
Displays process status. This toggle is active by default. | |
| PID | |
Displays PID number. | |
| Location | |
Displays routine name and location in the current source file. | |
| Arg Values | |
Allows you to set the argument values in the Callback Display. This toggle is active by default. | |
| Arg Names | |
Allows you to set the argument names in the Callback Display. This toggle is active by default. | |
| Arg Types | |
Allows you to display argument types in the Callback Display. | |
| PC | |
Allows you to set the program counter (PC) in Task View. | |
In addition to menus, Task View also contains the following items from which you can select to vary the display:
| Sort toggles | |
Allows you to sort the process list by Thread, Name, State, Pid, or Location, depending on which of the buttons is active. Default selection is Thread. | |
| Process display tabs | |
Allows you to view a list of tasks or details of the currently running (highlighted) task. | |
| Callstack display tabs | |
Allows you to view all call stack information or call stack details of the currently selected process.
| |
Select Views -> Exception View from the Main View window menu bar to display the Exception View window. Exception View is an Ada-specific view that allows you to set traps on exceptions and control exception handling. This view works only if the Ada compiler is installed. By default, this view displays only the following predefined Ada exceptions:
Constraint errors
Program errors
Storage errors
Tasking errors
In addition, a single breakpoint is set on any unhandled exception.
Figure A-9 shows a typical Exception View window.
The Admin menu has the following options:
| Active | |
Activates the current window in a set of cloned windows. | |
| Clone | |
Creates a clone of the current window. | |
| Save As Text | |
Launches the Save Text dialog. This dialog allows you to save your current session as text in a file you designate. | |
| Close | |
Closes the current window. | |
The Config menu has the following options:
| Load Exceptions | |
Opens the Load User Defined Exceptions dialog that allows you to add additional exceptions to the predefined Ada exceptions. | |
| Save Exceptions | |
Opens the Save User Defined Exceptions dialog that allows you to save any user-defined exceptions to the predefined Ada exceptions. | |
The Display menu has the following options:
| Delete All | Deletes all exception traps. | |
| Clear All Traps | Clears all exception traps. Clearing traps is not the same as deleting traps. Clearing only temporarily affects traps while deleting removes them permanently. | |
| Reset All Buttons | Resets all button actions. |
The Stop boxes toggle on and off to indicate whether a trap is active.
The When control menus allow you to determine when an exception trap fires. The following choices are available:
| Always | Stops any time the exception is raised. | |
| WhenOthers | Stops when caught by a when others handler rather than an explicit handler or when unhandled. | |
| Unhandled | Stops when the exception is unhandled. |
In the un-labeled text field at the bottom right of the window you can enter a single, fully qualified Ada exception name or a single, fully qualified Ada unit name. Depending on whether the add, remove, or find mode is active; pressing Enter will cause one of the following actions to occur:
add mode:
Single exception: Adds single exception to the exception list
Library unit name: Adds all exceptions found in that library unit name to the exception list
remove mode:
Single exception: Removes single exception from the exception list
Library unit name: removes all exceptions found in that library unit name from the exception list
set mode
clear mode
find mode:
Single exception: positions top of the exception list to single exception
Library unit name: positions top of the exception list to the first exception found in given library unit name
The X/Motif Analyzer provides specific debugging support for X/Motif applications. There are various examiners for different X/Motif objects, such as widgets and X Window System graphics context, that might be difficult or impossible to inspect using ordinary debugger functionality. See Chapter 11, “X/Motif Analyzer” for a comprehensive discussion and tutorial regarding the X/Motif Analyzer.
To access the X/Motif Analyzer window, pull down the Views menu and select X/Motif Analyzer (see Figure A-10).
Though the X/Motif Analyzer is made up of several different examiner windows, a number of objects, such as the Admin menu, Examine menu, Help menu and several text bars, remain constant throughout window changes. The following examiners are available and discussed in the sections indicated:
The Admin menu offers the following menu selections:
| Active | |
Activates the current window in a set of cloned windows. In the current release, this toggle is always active. | |
| Clone | |
Creates a clone of the current window. This action is not supported in the current release and the option is grayed out. | |
| Save As Text | |
Launches the Save Text dialog. This dialog allows you to save your current session as text in a file you designate. This selection is not available for examiners that are graphical displays, such as the Breakpoints Examiner, the Tree Examiner, and the Pixmap Examiner. | |
| Close | |
Closes the current window. | |
The Examine menu offers the following options:
| Selection | |
Selects the currently highlighted object for examination. You must first highlight the name of an object before you select this option. | |
| Widget | |
Uses the current selection as input to the widget examiner, then opens that examiner (see “Widget Examiner”, for information). | |
| Widget Tree | |
Switches the window view to the widget tree examiner (see “Tree Examiner”, for information). | |
| Widget Class | |
Switches the window view to the widget class examiner (see “Widget Class Examiner”, for information). | |
| Window | |
Switches the window view to the window examiner (see “Window Examiner”, for information). | |
| X Event | |
Switches the window view to the X Event examiner (see “Event Examiner”, for information). | |
| X Graphics Context | |
Switches the window view to the X graphics context examiner (see “Graphics Context Examiner”, for information). | |
| X Pixmap | |
Switches the window view to the X pixmap examiner (see “Pixmap Examiner”, for information). | |
In addition to access through the Examine menu, each examiner can be accessed through a tab at the bottom of each view (see Figure A-11).
When first launched, the X/Motif Analyzer has the following four tabs from left-to-right:
Breakpoints
Trace
Widget
Tree
As you select other examiners through the Examine menu, new tabs are added for the new examiners.
To delete a tab:
Select the tab you want to delete.
Right-click and select Remove Examiner from the pop-up menu.
The selected tab will disappear.
| Note: You can not remove the first four tabs. |
The X/Motif Analyzer will also bring up new examiner windows whenever they are needed (see Chapter 11, “X/Motif Analyzer” for more information).
Click on the collapsed tabs to the right to display them.
Both the Widget and Name text fields have return buttons (see Figure A-12) just to the right. Clicking these buttons causes the X/Motif Analyzer to respond exactly as if you had pressed Return on your keyboard.Only the Breakpoint Examiner and Widget Examiner have a Return button.
The Breakpoints examiner is not really an examiner, but a control area where you can set widget-level breakpoints. The breakpoints examiner is divided into three areas (see Figure A-12):
The widget specification area that contains the same information as that in the Widget examiner. You can select a widget address, name, or class in this area, as well as move to the widgets parents or children, or select a widget in the application. In cases where the breakpoint type does not apply to widgets (for example, input-handler breakpoints), this area is blank.
The parameter specification area, the contents of which vary according to the type of breakpoint you are setting. For example, for callback breakpoints, this area contains the callback name and client data; for event-handler breakpoints, it contains the event type and the client data, and so on.
The breakpoint area, which contains the breakpoint name, a search field, and the Add, Modify, Delete, and Step To buttons. Since the Search text field and the four buttons appearing in the Breakpoints area function the same way no matter which Breakpoint Type is selected, descriptions for these items are included here, and will not be described in each of the remaining subsections. These are:
| Search text field | |
Allows you to perform a text search through your breakpoints. | |
| Add button | |
Allows you to add a new breakpoint. | |
| Modify button | |
Allows you to change the selected breakpoint's settings. | |
| Delete button | |
Deletes the selected breakpoint. | |
| Step To button | |
Allows you to step to the next condition. Step To creates a temporary breakpoint, resumes the process, and waits until the process stops. This temporary breakpoint acts exactly like an ordinary breakpoint, save that the Step To button automatically resumes the process and puts up a busy cursor until the condition becomes true. | |
The control area has eight different breakpoint types that it can examine. These types are set through the Breakpoint Type options. The following Breakpoint Type options are available:
| Callback | |
Widget callback installed by XtAddCallback. Parameters include callback name and client_data XtPointer value. See “Callback Breakpoints Examiner”, for more information. | |
| Event-Handler | |
Widget event handler installed by XtAddEventHandler . Parameters include X event type and client_data XtPointer value. See “Event-Handler Breakpoints Examiner”, for more information. | |
| Resource-Change | |
Resource change caused by XtSetValues or XtVaSetValues. Parameters include resource name and resource value, both strings. See “Resource-Change Breakpoints Examiner”, for more information. | |
| Timeout-Procedure | |
Timeout callback installed by XtAppAddTimeOut. Parameters include client_data XtPointer value. See “Timeout-Procedure Breakpoints Examiner”, for more information. | |
| Input-Handler | |
Input callback installed by XtAppAddInput. Parameters include client_data XtPointer value. See “Input-Handler Breakpoints Examiner”, for more information. | |
| State-Change | |
Various widget state changes (for example, managed or realized). Parameters include widget state. See “State-Change Breakpoints Examiner”, for more information. | |
| X-Event | |
X event received by target application. Parameters include X event type. See “X-Event Breakpoints Examiner”, for more information. | |
| X-Request | |
X request received by target application. Parameters include X request type. See “X-Request Breakpoints Examiner”, for more information. | |
When the Callback option of the Breakpoint Type option button in the Breakpoints Examiner is selected, the Callback Breakpoints Examiner is displayed.
The Callback Breakpoints examiner contains the following items:
| Widget text field | |
Allows you to choose a widget to examine by entering the widget address. | |
| Name text field | |
Allows you to choose a widget to examine by entering the widget name. | |
| Class text field | |
Allows you to choose a widget to examine by entering the widget's class. Leave the field blank or enter Any to select all widgets. | |
| Parent text field | |
Allows you to move to the parent of the currently selected widget. | |
| Previous button | |
Moves you to the previously selected widget. | |
| Children button | |
Shows you the widget's children (it is grayed out if the selected widget cannot have children). | |
| Select button | |
Allows you to select the widget in the target process. | |
| Breakpoint Type option button | |
Allows you to select the type of breakpoint you wish to set. In this section, Callback is selected. | |
| Clear button | |
Clears all the current breakpoint selections and text fields. | |
| Callback Name text field | |
Allows you to set the Name of the callback for the breakpoint. | |
| Client_Data text field | |
Allows you to pass and get back pointer values for Client_Data. | |
When the Event-Handler option of the Breakpoint Type option button in the Breakpoint Examiner is selected, the examiner appears as shown in Figure A-14.
The Event-Handler Breakpoints examiner contains the following items:
| Widget text field | |
Allows you to choose a widget to examine by entering the widget address. | |
| Name text field | |
Allows you to choose a widget to examine by entering the widget name. | |
| Class text field | |
Allows you to choose a widget to examine by entering the widget's class. Leave the field blank or enter Any to select all widgets. | |
| Parent text field | |
Allows you to move the parent of the currently selected widget. | |
| Previous button | |
Moves you to the previously selected widget. | |
| Children button | |
Shows you the widget's children (it is grayed out if the selected widget cannot have children). | |
| Select button | |
Allows you to select the widget in the target process. | |
| Breakpoint Type option button | |
Allows you to select the type of breakpoint you wish to set. In this section, Event-Handler is selected. | |
| Clear button | |
Clears all the current breakpoint selections and text fields. | |
| Event Type option button | |
Allows you to set the event type for a given breakpoint. | |
| Client_Data text field | |
Allows you to pass and get back pointer values for the Client_Data. | |
When the Resource-Change option of the Breakpoint Type option button in the Breakpoint Examiner is selected, the examiner appears as shown in Figure A-12.
The Resource-Change Breakpoints examiner contains the following items:
| Widget text field | |
Allows you to choose a widget to examine by entering the widget address. | |
| Name text field | |
Allows you to choose a widget to examine by entering the widget name. | |
| Class text field | |
Allows you to choose a widget to examine by entering the widget's class. Leave the field blank or enter Any to select all widgets. | |
| Parent text field | |
Allows you to move the parent of the currently selected widget. | |
| Previous button | |
Moves you to the previously selected widget. | |
| Children button | |
Shows you the widget's children (it is grayed out if the selected widget cannot have children). | |
| Select button | |
Allows you to select the widget in the target process. | |
| Breakpoint Type option button | |
Allows you to select the type of breakpoint you wish to set. In this section, Resource-Change is selected. | |
| Clear button | |
Clears all the current breakpoint selections and text fields. | |
| Resource Name text field | |
Allows you to set the resource name for the breakpoint. | |
| Resource Value text field | |
Allows you to set the resource value for the breakpoint. | |
When the Timeout Procedure option of the Breakpoint Type option button in the Breakpoint Examiner is selected, the examiner appears as shown in Figure A-15.
The Timeout-Procedure Breakpoints examiner contains the following items:
| Breakpoint Type option button | |
Allows you to select the type of breakpoint you wish to set. In this section, Timeout-Procedure is selected. | |
| Clear button | |
Clears all the current breakpoint selections and text fields. | |
| Client_Data text field | |
Allows you to pass in and get back pointer values for the Client_Data. | |
When the Input-Handler option of the Breakpoint Type option button in the Breakpoint Examiner is selected, the examiner appears as shown in Figure A-16.
The Input-Handler Breakpoints examiner contains the following items:
| Breakpoint Type option button | |
Allows you to select the type of breakpoint you wish to set. In this section, Input-Handler is selected. | |
| Clear button | |
Clears all the current breakpoint selections and text fields. | |
| Client_Data text field | |
Allows you to pass in and get back pointer values for the Client_Data. | |
When the State-Change option of the Breakpoint Type option button in the Breakpoint Examiner is selected, the examiner appears as shown in Figure A-17.
The State-Change Breakpoints examiner contains the following items:
| Widget text field | |
Allows you to choose a widget to examine by entering the widget address. | |
| Name text field | |
Allows you to choose a widget to examine by entering the widget name. | |
| Class text field | |
Allows you to choose a widget to examine by entering the widget's class. Leave the field blank or enter Any to select all widgets. | |
| Parent button | |
Allows you to move the parent of the currently selected widget. | |
| Previous button | |
Moves you to the previously selected widget. | |
| Children button | |
Shows you the widget's children (it is grayed out if the selected widget cannot have children). | |
| Select button | |
Allows you to select the widget in the target process. | |
| Breakpoint Type option button | |
Allows you to select the type of breakpoint you wish to set. In this section, State-Change is selected. | |
| Clear button | |
Clears all the current breakpoint selections and text fields. | |
| State Type option button | |
Allows you to set the state change type for a given breakpoint. | |
When you select the X-Event option of the Breakpoint Type option button in the Breakpoint Examiner, the examiner appears as shown in Figure A-18.
The X-Event Breakpoints examiner contains the following items:
| Breakpoint Type button | |
Allows you to select the type of breakpoint you wish to set. In this section, X-Event is selected. | |
| Clear button | |
Clears all the current breakpoint selections and text fields. | |
| Event Type button | |
Allows you to set the event type for a given breakpoint. | |
| Window ID text field | |
Allows you to set the Window ID value for the breakpoint. | |
When the X-Request option of the Breakpoint Type option button in the Breakpoint Examiner is selected, the examiner appears as shown in Figure A-19.
The X-Request Breakpoints examiner contains the following items:
| Breakpoint Type option button | |
Allows you to select the type of breakpoint you wish to set. In this section, X-Request is selected. | |
| Clear button | |
Clears all the current breakpoint selections and text fields. | |
| Request Type button | |
Launches the Request Type Selection dialog (see Figure A-20). This dialog allows you to select the type of X-Request used for your breakpoint. The information displayed is in outline form; selecting a given item selects all its subitems. For example, if you select Window-Category, CreateWindow, ChangeWindowAttributes, GetWindowAttributes, and so on are also selected. | |
The Trace examiner (see Figure A-21) is a control area where you can trace the execution of your application and collect the following date:
X Server Events
X Server Requests
Widget Event Dispatch Information
Widget Resource Changes (through XtSetValues)
Widget State Changes (create, destroy, manage, realize, and unmanage)
Xt Callbacks (widget, event handler, work proc, timeout, input, and signal)
The Trace examiner contains the following items:
| Collect Trace toggle | |
Allows you to turn the tracing on and off. | |
| File text field | |
Allows you to select the file name for the trace. If no file is selected, a default filename for the trace is chosen. | |
| Search text field | |
Allows you to perform an incremental, textural search for the trace list. | |
| Filter button | |
Launches a dialog that allows you to select the trace entry types you want displayed in the list. | |
| Clear File button | |
Erases the trace file. Any subsequent trace information goes to the beginning of the file. | |
The Widget examiner (see Figure A-22) displays the internal Xt widget structure, as well as the Xt inheritance implementation using nested C constructs.
The Widget examiner contains the following items:
| Widget text field | |
Allows you to choose a widget to examine by entering the widget address. | |
| Name text field | |
Allows you to choose a widget to examine by entering the widget name. | |
| Parent button | |
Allows you to move the parent of the currently selected widget. | |
| Previous button | |
Moves you to the previously selected widget. | |
| Children button | |
Shows you the widget's children. (It is grayed out if the selected widget does not have children.) | |
| Select button | |
Allows you to select the widget in the target process. | |
The Tree examiner (see Figure A-23) displays the widget hierarchy.
You may double-click a node to view that widget in the Widget examiner.
If the Tree examiner is currently selected, it will not automatically fetch the current widget tree each time the process stops. To force retrieval of the widget tree, select another examiner and then go back to the Tree examiner. Or, click on the Tree tab.
The graphical buttons across the bottom of the Tree Examiner window from left-to-right have the following functions.
| Zoom percentage indicator | |
Click on this indicator to bring up a submenu from which you can select a different percentage. | |
| Zoom Out button | |
Decreases the zoom percentage. | |
| Zoom In button | |
Increases the zoom percentage. | |
| Overview button | |
Shows the entire tree structure in another window along with an indication of which portion of the tree is currently being displayed in the full-sized Tree Examiner window. | |
| Multiple Arcs button | |
This button shows/hides multiple connections between nodes on the graph. For example, if main calls foo several times, you will see a line (arc) for all calls made. | |
| Realign button | |
This button resets the graph back to its original configuration (before you began working with it). Also, hidden nodes will reappear. | |
| Rotate button | |
Change the format of the window from up-down to left-right, or vice-versa. | |
| Search button | |
Search for text in the tree using a Widget Hierarchy Search Text window. | |
| Widget View Type Option button | |
Click on this indicator to change the kind of information being displayed in the nodes of the tree. This will bring up a submenu which allows you to choose Name, Class, ID (widget address) or Window (indicate <gadget> or address). | |
The Callback examiner (see Figure A-25) automatically appears when the process is stopped somewhere in a callback. It first displays the callstack frame. Then it displays information about the widget in the callback. Finally, it displays the proper callback structure contained in the call_data argument to the callback procedure, based on the widget type and the callback name.
The Window examiner (see Figure A-26) displays window attributes for an X window and the parent and children window IDs. These attributes are returned by XGetWindowAttributes, with decoding of the visual structure, enums, and masks.
The Window examiner contains the Window text field that displays the address of the window that is being examined. You may change to a different window by entering a new address and pressing Enter.
The Event examiner (see Figure A-27) displays the event structure for an XEvent pointer. The proper XEvent union member is used, and enums and masks are decoded.
The Event examiner contains the X Event text field, which displays the address of the X event that is being examined. You may change to a different X event by entering a new address and pressing Enter.
The Graphics Context examiner (see Figure A-28) displays the X graphics context attributes that are cached by Xlib in the form of an XGCValues structure. Enums and masks are decoded.
The Graphics Context examiner contains the GC text field that displays the address of the graphics context that is being examined. You may change to a different context by entering a new address and pressing Enter.
The Pixmap examiner (see Figure A-29) displays basic attributes of an X pixmap, like size and depth. It also attempts to provide an ASCII display of small pixmaps, using the units digit of the pixel values.
The Pixmap examiner displays the contents of an X pixmap. To specify an X pixmap identifier, enter a numeric expression in the top text field of the window. Then, use default as the colormap identifier to specify the default X colormap for your screen. In the pixmap display, left-click on a pixel to see the pixel value, position, and red-green-blue intensities.
The Widget Class examiner (see Figure A-30) displays the Xt widget class structure, as well as the Xt inheritance implementation using nested C constructs.
The Widget Class examiner contains the W Class text field, which displays the address of the widget class that is being examined. You may change to a different widget class by entering a new address and pressing Enter.
In addition to setting traps by using the command line, the Views menu of the Main View window provides you with three views specific to trap management:
Trap Manager
Signal Panel
Syscall Panel
Call up the Trap Manager window from the Main View window menu bar as follows:
Views -> Trap Manager
The Trap Manager allows you to set, edit, and manage traps (used in both the Debugger and Performance Analyzer). The X window is shown in Figure A-31.
The Trap Manager window contains the following items (besides the menu bar, which is discussed below):
| Trap text field | |
Contains a description of the trap. | |
| Condition text field | |
Contains the condition of the trap. | |
| Cycle Count text field | |
Displays the current cycle count. | |
| Current Count text field | |
Displays the current trap count. | |
| Full button | |
Allows you to toggle between display of full and partial path names. | |
| Modify button | |
Allows you to change the selected breakpoint's settings. | |
| Add button | |
Allows you to add a new breakpoint. | |
| Clear button | |
Clears all the current breakpoint selections and text fields. | |
| Delete button | |
Deletes the selected breakpoint. | |
| Active label | |
If selected with a check mark, the trap is enabled. | |
| Trap display area | |
Contains a description of each trap, and a toggle to indicate whether or not the trap is active. | |
| Search text field | |
Allows you to perform an incremental textual search for the trap list. | |
The Trap Manager window has a menu bar which contains the Admin, Config, Traps, Display, and Help menus. The Admin menu is the same as that described in “Admin Menu”. The Help menu is the same as that described in “Help Menu”. The other menus are described in the following sections.
The Config menu contains the following items:
| Load Traps | |
Brings up the File dialog allowing you to load the traps from a file. | |
| Save Traps | |
Brings up the File dialog allowing you to save the current traps to a file. | |
The Traps menu has options that allow you to set traps under a number of conditions. The following conditions are available:
| At Source Line | |
Highlight a line in the Main View window's source pane before selecting this option to set a breakpoint at the selected line. | |
| Entry Function | |
Highlight a function name in the Main View window's source pane before selecting this option to set a breakpoint at the entry to the function. | |
| Exit Function | |
Highlight a function name in the Main View window's source pane before selection this option to set a breakpoint at the exit from the function. | |
| Stop Trap Default | |
Causes a trap created to be a “stop” trap. Toggles with the Sample Trap Default. | |
| Sample Trap Default | |
Causes a trap created to be a “sample” trap. Toggles with the Stop Trap Default. | |
| Group Trap Default | |
ON/OFF toggle to cause a trap created to have the “pgrp” option. | |
| Stop All Default | |
ON/OFF toggle to cause a trap created to have the All option. | |
The Display menu contains the following item:
| Delete All | |
Deletes all traps from the trap list. | |
The Signal Panel displays the signals that can occur. You can specify which signals trigger traps and which are to be ignored. The Signal Panel is shown in Figure A-32.
The Signal Panel contains an Admin menu (described in “Admin Menu”) and a Help menu (described in “Help Menu”). Each signal trigger trap in the display has a toggle associated with it. In addition, the panel has a Search text field.
| Note: When debugging IRIX 6.5 pthreads, the Signal Panel is inaccessible if more than one thread is active. |
The Syscall Panel allows you to set traps at the entry to or exit from system calls. The Syscall Panel is shown in Figure A-33.
The Syscall Panel contains an Admin menu (described in “Admin Menu”) and a Help menu (described in “Help Menu”). Each system call in the display has two toggles associated with it: one to set a trap on entry, one to set a trap on exit. In addition, the panel has a Search text field.
There are several windows that are used primarily to examine your program's data:
To examine numeric, pointer, or character string data in an array variable, select Array Browser from the Views menu at a point in the process where the variable is present. The Array Browser allows you to view elements in a multi-dimensional array (up to 100 x 100 elements), presented in a spreadsheet and graphically, if desired.
| Note: The Render, Color, and Scale tear-off menus are available only if you are have an SGI workstation with Open Inventor installed on it. |
The array specification area allows you to specify the variable and its dimensions. It consists of the following fields:
| Array | |
Allows you to enter the name of the array variable. This entry is language-dependent. For Fortran, the expression may be an array or a dummy array variable name. If the last dimension of the array is unspecified (*), a subscript value of 1 is assumed initially. For C and C++, the entry may be an array or a pointer. If pointers are used, the expression is treated as though it were a single element, in which case you need to use the subscript controls to see more than the first element. | |
| Indexing Expression | |
The expression used to view an element in the array. It is filled in automatically when you specify an array to view. The expression supplied is language-specific. It represents the indexing expression used in the language to access a particular element. The subscripts are specified by special indexing variables ($i, $j, $k, and so forth) that can be manipulated in the subscript controls area. | |
The Subscript Controls area allows you to control which elements in the variable are displayed and allows you to shift the current element. The number of dimensions in the array governs the number of controls that are displayed. A close-up view of the subscript controls area appears in Figure A-35.
The Subscript Controls area provides the following features:
| Row/column toggles | |
Controls whether an index variable represents rows or columns (or neither) in the spreadsheet area. You are not limited by the number of dimensions of an array, but you can only view a two-dimensional orthogonal slice of the array at a time. | |
| Index identifiers | |
Indicates to which subscript the controls in the row refer. | |
| Index values | |
Shows the value of the subscript for the element currently in the focus cell. You can enter a different value if you wish. | |
| Index sliders | |
Lets you move the focus cell along the particular dimension. | |
| Index minimums | |
Identifies the beginning visible element in that particular dimension. | |
| Index maximums | |
Identifies the last visible element in that particular dimension. If you have an unspecified array, you can use this field to specify the last element in the vector to be displayed in the spreadsheet. | |
| Step indicators | |
Specifies the increment between adjacent elements in the dimension to be displayed. A value of 1 displays consecutive data. Specifying some n greater than 1 allows you to display every n element in a vector. | |
| Control area scroll bars | |
Allows you to expose hidden portions of the subscript control area if your window is not large enough for viewing all of the controls. | |
The spreadsheet area is where numeric data is displayed. It can show two dimensions at a time (indicated in the upper left corner of the matrix). The column indexes run along the top of the matrix and the row indexes are displayed along the left column. The spreadsheet area has scroll bars for viewing data elements not currently visible in the viewing area. Figure A-36, shows a close-up of the spreadsheet area.
The current element is highlighted by a colored rectangle in the spreadsheet area. Its corresponding expression is shown in the current element identifier field, and the value is shown in the current element value field.
The Spreadsheet menu allows you to change the appearance of data in the spreadsheet area. It provides these selections:
| Column Width | |
Allows you to specify the width of the spreadsheet cells in terms of characters. For instance, a value of 12 indicates that 12 characters, including punctuation and digits are viewable. | |
| Wrapped Display | |
Allows you to display a single dimension of an array wrapped around the entire spreadsheet area. The index value for an element is determined by adding the appropriate row index and column index values. Figure A-37, shows an example of a wrapped array. There is only one index $i. The current cell is element 4 in the array (by adding 3 and +1). | |
| Auto Fit Data | |
If enabled, automatically resizes the spreadsheet cell to fit the maximum size of the data to be displayed. If this is enabled, then the Column Width is disabled. This option is on by default. | |
The Format menu displays a separate menu that you allows you to display the elements in the following formats:
| Default toggle | ||||||||||
Toggles the default format. | ||||||||||
| Value submenu | ||||||||||
Contains the following display toggles for formatted values:
| ||||||||||
| Type | ||||||||||
Allows listing by data type. | ||||||||||
| Bit Size | ||||||||||
Allows listing by bit size. | ||||||||||
The graphical display area presents array data in a three-dimensional graph in one of the following formats:
Surface (polyhedron)
Bar chart
Points
Multiple lines (array vectors)
The Render tear-off menu is available only if you are have an SGI workstation with Open Inventor installed on it.
You select the graphical display mode through the Render menu. The Render menu has the following options:
| Surface | |
Exhibits the data as a solid using the data values as vertices in a polyhedron. | |
| Bar Chart | |
Presents the data values as 3-D bar charts. | |
| Points | |
Simply plots the data values in 3-D space. | |
| Multi Line | |
Plots and connects the data values in each row. | |
| None | |
Allows you to display with no graphical display, in effect turning off graphical display mode. | |
The Color tear-off menu is available only if you are have an SGI workstation with Open Inventor installed on it.
If the Color menu is grayed out when the Array Browser window first opens, select the Surface option of the Render menu. The Color menu provides the following options:
| Monotone Ramp | |
Displays the data values in a single tone, with lower numbers being darker and higher values lighter in tone. | |
| Hue Ramp | |
Displays the data values in a spectrum of colors ranging from blue (lowest values) through green, yellow, orange, and red (highest values). | |
| Exception | |
Allows you to flag certain conditions by color, usually for the purpose of spotting bad data. When you select Exception, the controls shown in Figure A-38 appear in the window. Thus, you can highlight data values less than or greater than specified values, values of plus or minus infinity, values of plus or minus underflow, zero values, and NaN (not a number) values. | |
| Note: The Scale tear-off menu is available only if you are have an SGI workstation with Open Inventor installed on it. |
If the Scale menu is grayed out when the Array Browser window first opens, select the Surface option of the Render menu.
The Scale menu provides options for changing the ratio of the z-dimension, which represents the value of the element. The number on the left represents the value of the x and y-dimensions (which are always the same as each other). The number on the right is the z-dimension.
Manipulating the z-dimension affects the ease of spotting differences in values. If your data is scattered over a narrow range of values, you may wish to heighten the graph by selecting 10:1 as your scale; this exaggerates the values in the z-dimension. If your data is in a wide range, selecting 1:2 or 1:10 as the scale will minimize the differences, flattening the graph.
| Note: The Examiner Viewer is available only if you are have an SGI workstation with Open Inventor installed on it. |
The graphical display uses controls and menus from Examiner Viewer. Examiner Viewer is based on a camera metaphor and borrows terms from the film industry, such as zoom and dolly, in naming its controls. The graphical display area of the window is shown in Figure A-40, with its main controls and menus. Note that the buttons on the upper right side of the graphical display area may not be visible if the area is too small; you can expose them by moving either the upper or lower sash to enlarge the display area. (The lines between the window panes include a small box to the right. Click-drag this box to change the size of the panes.)
Examiner Viewer provides these controls for viewing the graph. The right side buttons provide the following actions:
| view mode | Toggles between a view-only mode (closed eye) and manipulation mode (open eye). In view-only mode, the cursor appears as an arrow and the graph cannot be moved. Clicking on a portion of the graph selects the corresponding array element in the spreadsheet. In manipulation mode, the cursor appears as a hand and you can move the graph. Dragging the graph with the left mouse button down moves the graph in any direction as if it were in a trackball; a quick movement spins the graph. Dragging the graph with the left mouse button and the Ctrl key rolls (rotates) the graph in the plane of the screen. Dragging the graph with the middle mouse button moves it without changing the viewing angle. If you drag the graph with both the left and middle mouse buttons down, the graph will appear to move into or out of the window (this is the same as the dolly thumbwheel, which is described in this section). |
| help | Runs a special help system containing Inventor Viewer information. |
| home | Repositions the graph in its original viewing position. |
| set home | Changes the home (original viewing) position for subsequent use of the home button. |
| view all | Repositions the display area so that the entire graph is visible. |
| seek | Provides a special cursor that allows you to reposition the graph in the center of the display area or allows you to center the view on a point you select with the cursor. See Seek to point <or object> in the Preferences dialog box. |
The following controls let you move the graphic display:
| x rotation thumbwheel | |
Rotates the graph around its x-axis. | |
| y rotation thumbwheel | |
Rotates the graph around its y-axis. | |
| dolly thumbwheel | |
Changes the size of the graph and adjusts the angles to maintain perspective. The dolly control simulates moving the viewing camera back and forth with respect to the graph. | |
You access the Examiner Viewer menu by holding down the right mouse button in the graphical display area. The Examiner Viewer menu provides the following options (see Figure A-40 for illustration):
| Functions | |
Displays a submenu with the selections Help, Home, Set Home, View All, and Seek, which are the same as the right mouse button controls described in the previous section, and the Copy View and Paste View selections. These operate like standard copy and paste editing commands, enabling you to transfer graphs. | |
| Draw Style | |
Displays a submenu that controls how the graph is displayed. The top group of options, from as is to bounding box (no depth) control how the graph is displayed when it is static. These override any Render menu selections. The middle (move... ) group of options control how the graph is displayed while in motion. The last three options, single, double , and interactive, refer to buffering techniques used in moving the graph. These affect the smoothness of the movement. | |
| Viewing | |
The same as the view mode button described in the previous section. When it is off, you can select points from the graph to display in the spreadsheet but cannot move the graph. When on, it allows you to manipulate the graph. | |
| Decoration | |
Displays the right side buttons when it is on and hides them when it is off. | |
| Headlight | |
Controls the shadow effect on the graph. When it is on, the light appears to come from the camera. | |
| Preferences | |
Causes the Examiner Viewer Preferences Sheet dialog to display. | |
The Examiner Viewer Preference Sheet dialog provides the following options:
| Seek animation time | |
Allows you to specify the time it takes for the graph to be repositioned after you change the seek point. Set to 0 for instant seek. See also Seek to point <or object>. | |
| Seek to point <or object> | |
Seek to point uses the picked point and surface normal to align the camera. Seek to object uses only the object center to align the camera. | |
| Seek distance wheel | |
This wheel controls how close to the camera the object will appear. This distance can be either an absolute distance or a percentage of the distance to the picked point. | |
| Camera Zoom slider | |
This slider allows you to set (in degrees) the camera height angle (only perspective camera). If you wish, you may set this value in the field immediately to the right of the slider. | |
| Zoom slider ranges from | |
Range is 1.0 to 140.0 by default, but you can reset this if you wish. | |
| Auto clipping planes | |
Centers the graph in your view if enabled. If disabled, it allows you to move the graph out of view at either end of the z-axis. This is useful if you wish to focus on data above or below a set value. | |
| Stereo Viewing | |
This may be turned on to see the scene in stereo (special glasses required). The offset between the left and right eye can be specified using the camera rotation thumbwheel. | |
| Enable spin automation | |
When selected, you can cause the camera to continue spinning. To animate, left-click and drag in the direction of your desired spin, then release while spinning. The graph spins as if by a trackball. To stop, left-click anywhere. | |
| Show point of rotation axes | |
Displays a set of three axes. You can move the graph around the x and y axes using the thumbwheel controls described in the previous section. When this option is on, you can set the size of the axes in pixels. | |
The Call Stack (Figure A-42) window displays call stack entries when a process has stopped.
The source display in the Main View window has two special annotations that are synchronized with the Call Stack:
The location of the current program state is indicated by a large arrow representing the PC. The source line to which the arrow points is highlighted (usually in green).
The location of the call to the item selected in the Call Stack window is indicated by a small arrow representing the current context. The source line becomes highlighted (usually in blue-green).
The Call Stack contains its own menu bar, which contains the Admin, Config, Display, and Help menus. The Admin menu is the same as that described in “Admin Menu”. The Help menu is the same as that described in “Help Menu”. The other menus are described in the following sections.
The Config menu contains the following option:
| Preferences | |
Launches the Call Stack Preferences dialog that allows you the option of setting the maximum depth of the Call Stack. | |
The Display menu contains the following toggles which change what is displayed in each entry of the Call Stack in addition to the subroutine/function name:
| Arg Values | |
Allows you to display argument values. Default is on. | |
| Arg Names | |
Allows you to display argument names. Default is on. | |
| Arg Types | |
Allows you to display argument types. Default is off. | |
| Location | |
Allows you to display function location. Default is on. | |
| PC | |
Allows you to display the program counter (PC). Default is off. | |
The Expression View window is shown in Figure A-43. Expression View displays a collection of expressions that are evaluated each time the process stops or the context changes.
In addition to the items on the menu bar, the window has two pop-up menus: the Language menu and the Format menu. The Admin menu is the same as that described in “Admin Menu”. The Help menu is the same as that described in “Help Menu”. The other menus are described in the following sections.
The Config menu contains the following options:
| Load Expressions | |
Launches the Load Expressions dialog box that allows you to choose source file from which to load your expressions. | |
| Save Expressions | |
Launches the Save Expressions dialog box that allows you to choose a file to which you can save your expressions. | |
The Display menu contains the following option:
| Clear All | |
Clears all fields in the view. | |
The Language pop-up menu contains three buttons that allow you to select one of three languages for evaluation: C, C++, or Fortran. The Language pop-up is invoked by holding down the right mouse button while the cursor is in the Expression column.
The Format pop-up menu is displayed by holding down the right mouse button in the Result column.
The Format popup contains the following options:
| Default | |
Sets the format to the default values. | |
| Value | |
Displays a submenu from which you can select a value of Decimal, Unsigned, Octal, Hex, Exponential, Float, Char, String, or Wide Character type. | |
| Type | |
Displays a submenu from which you can select a type of Decimal, Octal, or Hex. | |
| Bit size | |
Sets the format to Bit Size. | |
The File Browser window displays a list of source files used by the current executable. Double-click on a file in the list to load it into the source display area in the Main View or Source View windows. Some files may be listed due to subroutines/functions being resolved from system libraries. If you select such a file, you may get the following message:
Unable to find file <xxx.c> |
This is because the source for system library routines may not be stored on your system.
The Search field allows you to find files in the list.
The File Browser contains an Admin menu (described in “Admin Menu”) and a Help menu (described in “Help Menu”). In addition, the browser has a Search field.
The Structure Browser window allows you to examine data structures and the relationships of the data within them. It displays complex data structures as separate graphical objects, using arrows to indicate relationships. A sample Structure Browser is shown in Figure A-46, with the Config, Display, Node, and Format menus displayed.
The structure name is entered in the Expression field. It then appears as an object or set of objects in the display area in the lower portion of the window. Each structure has a header identifying the structure, color coded by data type. Below the header are two columns: the left displays the field name and the right displays the field's value. If a displayed structure exceeds the size of the Structure Browser window, scroll bars appear.
While the Admin menu contains options for selecting the active structure, cloning structures, saving them as text, and closing the Structure Browser window; the four additional menus contain options that allow you to change the way data is displayed. The following data-display menus are available:
| Config | Provides options for saving and reusing type-specific formats and expressions. You can also set preferences regarding how objects of a given type are to be displayed. |
| Display | Provides display options for all objects in the display area. |
| Node | Provides options for selected objects in the display area only. |
| Format | Allows you to change or reformat a specific value in the result column. To access this pop-up menu, hold down the right mouse button while the cursor is over the result column. |
WorkShop provides the Structure Browser Overview window (from the Show Overview option in the Display menu) as another way to navigate around the display.
This window is a reduced-scale view of the requested structures. The structures are represented by solid rectangles color-coded by data type. The relative position of the currently visible area is represented by a transparent rectangle. This rectangle can be dragged (using the left mouse button) to change the display of the Structure Browser. Clicking the left mouse button in an area of this window repositions the currently visible area.
The Structure Browser accepts any valid expression. If the result type is simple, a structure displays showing the type and value. If the result type is a pointer, it is automatically de-referenced until a non-pointer type is reached. If the result type is a structure or union, an object is displayed showing the structures' fields and their values. After the expression is entered, the Expression field clears. The Structure Browser can display unrelated structures at the same time; you simply enter new structures by using the Expression field.
The Expression field is also used to enter strings used in searches.
Within the display area, you select objects by clicking in the node headers. Shift-clicks add the selected object to the current selection. You can drag selected objects using the middle mouse button.
Clicking the right button while the cursor is in the right column of an object displays the Format menu, which is used to change the display. You can set a default format or request that results be displayed by value, type, address, or size in bits.
Holding down the right button in the header of an object brings up the Node pop-up menu, which is the same as the Node menu in the menu bar. It is used to change the way selected objects are displayed. When you left-click in the header of an object, it turns on the resizer, which allows you to change the size of the object. You will see a small square (handle) at the upper-right and lower-left corners. Left-click-drag the handle to resize the object. Middle-click-drag the handle to move the object.
Arrows show relationships among the displayed structures. If a member field is not visible in a structure, its arrow tail is displayed at the top or bottom of the scrolling area for fields. Otherwise, its tail is adjacent to its field.
Double-clicking a value field (right column) for a pointer changes the display so that the data structure it points to is displayed.
Double-clicking a member field (left column) puts the full expression for that member in the Expression field.
The Display menu controls the way structures appear in the display area. The Display menu provides the following options:
| Display | Determines contents of the display. The Display option has the following two options: |
| Arrange | Rearranges the currently selected nodes. Arrange has the following two options: (See Figure A-47.) |
| Search | Allows you to select structures in the display area that contain the string specified in the Expression field. Search has the following four options:
|
| Update | Explicitly updates the displayed structures. This happens automatically in the current Structure Browser when the process stops. This can be used in an inactive Structure Browser to update it. It can also be used to update the display after changes have been made in other Debugger views. |
| Show Overview | Brings up the Structure Browser Overview window. |
| Clear All | Clears all structures from the display area. |
The Node menu gives you options that apply to currently selected objects.
Descriptions for these menu items are as follows:
| State | Controls the display of nodes. There are three options: |
| Geometry | Manages graphical objects in the display area. There are four options:
|
| Select | Allows you to select objects in various ways. There are six options:
|
| Formatting | Brings up the type formatting dialog for this type. |
| Dereference Ptrs | Dereferences any pointers in selected objects. |
| Pattern Layout | Displays selected structures that are connected by pointers to position related structures in the same way. |
| Remove | Removes selected object from the display. |
Each field in a data structure has certain display characteristics. These can be specified for all objects in the Structure Browser Preferences dialog box or for type-specific objects only in the Structure Browser Type Formatting dialog box. To display the Structure Browser Preferences dialog box, select Preferences from the Config menu (see Figure A-49).
The dialog has the following fields:
| Default Structure Field Count | |
Sets the number of fields to be displayed initially. | |
| Default Structure Width | |
The width in pixels of the object. | |
| Default Iconic Width | |
The width in pixels of the object when it is in iconic form. | |
| Automatic Dereference Limit | |
Limits the number of structures that are automatically dereferenced. | |
| Dereference Ptrs By Default | |
Toggles automatic dereferencing on and off. | |
To bring up the Structure Browser Type Formatting dialog box, select the set of structures under consideration and select Node Formatting from the Node menu (see Figure A-50).
The dialog box has the following fields:
| Type Name | |
Displays the current data type. | |
| Default Field Count | |
Lists number of fields to be displayed initially for objects of that type. | |
| Default Structure Width | |
Displays the width in pixels of the object. | |
| Default Iconic Width | |
Displays the width in pixels of the object when it is in iconic form. | |
| Default State | |
Brings up a pop-up menu that allows you to specify whether structures are first displayed as icons (Iconic), with the minimum number of fields displayed (Normal) or with all fields displayed (Detail). | |
| Type Color | |
Provides a submenu for color coding. It allows you to select a color for the header and overview rectangles for objects of a given type. | |
For structure and union types, the list box shows all the fields with their types. For each field, you can change the result format to one of the following types:
Default
Decimal
Unsigned
Octal
Hex
Float
Exponential
Char
String
Wide Character
Type
Dec addr
Oct addr
Hex addr
Bit Size
You can also specify whether a field is visible in normal state, and if it is a pointer field, whether it should be automatically dereferenced.
Once you specify the format for this type, you can apply it to any combination of the following through the toggle buttons in the bottom left portion of the window:
Selected instances
All existing instances
Any future instances of this type
The Variable Browser window allows you to view and change the values of local variables and arguments at a specific point in a process. (Global variables can be viewed or changed using Expression View or the Evaluate Expression selection from the Data menu for one-shot evaluations.) In addition to providing values, the Variable Browser is useful for getting a quick list of the local variables in a scope without having to search for their names. A sample Variable Browser window with the Language and Format menus displayed is shown in Figure A-51.
Typically, you inspect variable values at the following points:
At a breakpoint
At a frame in a call stack
As you step through a process
A useful technique is to set a trap at the entry to a function and inspect the values of the variables there. Some variables may be in an uninitialized state at that point. You can then step through the function and make sure that no uninitialized variables are used inadvertently.
| Note: In programs compiled by using the -n32 -g compiler options, you cannot click on or print an unused variable as you could when using the -o32 -g options. |
The Variable Browser allows you to change the values of variables in the window. You simply enter the new value in the result column and press Enter. Thus, you can force new values into the process and see their effect.
By using the sash between the columns, you can adjust the relative widths of the Variable and Result columns (see Figure A-51). For example, you may wish to adjust for short variable names and long result values.
The Debugger views that are involved with variables (that is, the Variable Browser and Expression View) have indicators that show when the variable has changed since the last breakpoint. If you click the indicator, you can view the previous value. The variable change indicators for a Variable Browser window are shown in Figure A-52.
The Debugger offers three views useful in debugging at the machine level: the Disassembly View, Register View, and Memory View.
The Disassembly View window allows you to look at machine-level code rather than source-level code. A typical Disassembly View window is brought by selecting the following from the Main View window menu bar:
Views -> Disassembly View
The window is shown in Figure A-53, with the Disassemble menu displayed.
At the top of the window are the same process control buttons as those in the Main View window. They behave the same way except for Step Into and Step Over, which do machine-level instruction stepping instead of source-level. Remember that you can select the number of steps by holding down the right mouse button over the Step Into and Step Over buttons.
The Admin, Display, Traps, and PC items on the menu bar basically work same as their counterparts in the Main View window. The exception is that the PC submenu selections Continue To and Jump To are based on machine-level instructions rather than source-level steps.
The Disassemble menu is discussed in “The Disassemble Menu”. The Preferences selection from the Config menu is discussed in “The Config Menu Preferences Dialog”.
You can set traps either by using the Traps menu or by clicking in the annotation column to the left of the source display area that contains the disassembled code.
The Disassemble menu allows you to display disassembled code. It contains the following items:
| Address | |
Allows you to disassemble a specified number of lines, starting from a specified source line address (see Figure A-54). | |
| Function | |
Allows you to disassemble a specified number of lines, starting from the beginning address of a specified function name (see Figure A-55). | |
| File | |
Allows you to disassemble a specified number of lines, starting from the address corresponding to a specified line number in a specified file (refer to Figure A-56). If you have a current selection in the Main View window or the Source View window, its file and cursor position are used as the default file name and line number, respectively. | |
Selecting Preferences from the Config menu brings up the Disassembly View Preferences dialog box (shown in Figure A-57) so that you can select the display preferences you desire.
The dialog box provides you with the following options:
| Number of instructions to disassemble | |
Controls the default number of disassembly lines shown when the process stops. This number appears in the dialog boxes selected from the Disassemble menu (see Figure A-54, Figure A-55, and Figure A-56). The default is all instructions, indicating that the entire function will be disassembled. | |
| Minimum lines around current instruction | |
Controls the display of the disassembled code, enabling you to view at least the specified number of instructions before and after the current instruction. | |
| Register name display format | |
Controls how register names are displayed. The available modes are Hardware, Compiler, and Assembler. | |
| Show embedded source annotation | |
When ON, displays source and disassembly statements interleaved. When OFF, displays disassembly statements only. | |
| Show source file and line number | |
Displays the filename and file position along with each machine instruction. | |
| Show function name and line number | |
Displays the function name and file position along with each machine instruction. | |
| Show machine address | |
Displays the memory address of each machine instruction. | |
| Show instruction value | |
Displays the instruction word along with each machine instruction. | |
| Show jal targets numerically | |
Controls whether the target address of a jal instruction is displayed as a hex address or symbolic label. | |
| Show supplemental address info (pixie, cord, original) | |
Displays additional address information. This may be used to set address breakpoints in the Main View command window for corded or pixified code. | |
Register View window allows you to examine and modify register values. You bring it up by selecting Register View from the Views menu in the Main View window. Figure A-58, shows a typical Register View window that has been resized to show all available registers.
The Register View window displays each register with its current value. A question mark (?) displayed immediately before a register value signifies that the value is suspect; it may not be valid for the current frame. This can occur if a register is not saved across a function call. A colored marker indicates that a register value has changed since the last time the process stopped.
The major features of the Register View window are the following:
| Current register field | |
Identifies the currently selected register. You can switch to a different register by entering its name (either by hardware name or by alias) in this field and pressing Enter. You can also switch registers by clicking on the new register in the display area. | |
| Current register value field | |
Shows the contents of the selected register. You can assign a new value to a register by entering either a literal or an expression into the Value field. You then click on the Modify button to change the value or press Enter. | |
| Register display area | |
Shows the registers organized into four groups: general, special, floating, and double. Note that the general registers are identified by both their hardware and software names. For systems with 32-bit processors (O2s, for example), double precision registers represent a pair of floating-point registers. For systems with 64-bit processors (Origin2000s, for example), float registers are not displayed at all. Floating-point calculations are done in double precision registers. | |
| Note: The special registers p0, p1, and p2 do not appear in Figure A-58. These are used for instrumentation and appear only when instrumentation has taken place. |
The Preferences selection in the Config menu allows you to change the Register View display. It brings up the Register View Preferences dialog box (see Figure A-59).
The register display toggle buttons let you specify which types of registers are to be displayed by default.
The register formatting area allows you to select formats for any of the registers.
The default fields in the top row let you change defaults for the four major types, which are set as follows:
General registers -- hexadecimal
Special registers -- hexadecimal
Float registers -- floating point
Double registers -- floating point
The rows in the register formatting area let you change the modes for the individual registers.
The Memory View window allows you to examine and modify memory. A typical Memory View window appears in Figure A-60.
To view a portion of memory, enter the beginning memory location in the Address field. You can enter the literal value or an expression that evaluates to an integer address. These address specifications must be in the language of the current process as indicated by the call stack frame. The syntax of this expression depends upon the language of the program. For example, you can enter 0x7fff4000+4 as the memory address when stopped in a C function or enter $7fff4000+4 as the equivalent for a Fortran routine. Press Enter while the cursor is in the field or click the View button to display the contents of that location and the subsequent locations in the display area. This also displays the contents of the first address in the Value field where it can be modified.
The memory display area shows the contents of individual byte addresses. The column at the left of the display shows the first address in the row. The contents at that address are shown immediately to its right, followed by the contents of the next seven byte locations. If you enlarge the Memory View window, you can see additional rows of memory.
To change the contents of a memory location, you select the address to be changed, either by direct entry or by clicking on the byte value in the display area. You can enter a single value or a sequence of hex byte values separated by spaces (for example, 00 3a 07 b2) in the Value field. You can also enter a quoted string to change a consecutive range of values to the ASCII values of that string. Pressing Enter while the cursor is in the Value field or clicking the Modify button substitutes the new value(s) starting at the specified location.
The Mode menu allows you to change the format of the value field and byte locations to either decimal, octal, hex, or ASCII.
The four control buttons at the upper right of the window help you move around the display area. These buttons are:
| Up | |
Moves displayed bytes up a single row. | |
| Down | |
Moves displayed bytes down a single row. | |
| Page Up | |
Moves displayed bytes upward by as many rows as are currently displayed. | |
| Page Down | |
Moves displayed bytes downward by as many rows as are currently displayed. | |
The Fix+Continue utility interacts with several Debugger windows. The Main View and Source View windows access the Fix+Continue utility from the menu bars. The standard output results of running redefined code are displayed in the Execution View window (refer to “Changes to Debugger Views”).
Special line numbers (in decimal notation) applied to redefined functions appear in several views.
| Note: Fix+Continue functionality within the debugger is limited to C++ programs compiled with the -o32 compiler option. |
Status Window
Message Window
Build Environment Window
This section describes Fix+Continue menu selections and windows.
The Fix+Continue menu is available from the Main View menu bar. The menu selections operate on the selected code or the file shown in the Source View window. The Fix+Continue menu is also available from Source View window and from the Fix+Continue Status window.
The Fix+Continue Status window (see Figure A-61) provides you with a summary of the modifications you have made during your session. It also allows you quick access to your modifications and somewhat expanded menu options.
The function ID number, status, name, and file name are displayed in the window. Double-clicking a line in the window brings up the corresponding source in the Debugger main window.
Fix+Continue Status window menus and submenus are described in Figure A-62.
The View menu contains options for sorting information in the window and displaying file names.
| Sort Status View | |
Sorts the information in the status view according to the field currently selected. | |
| Show Long Filenames | |
Toggles among absolute (long) path names or base names. | |
The Fix+Continue menu available from the Fix+Continue Status window is somewhat different from that available through the Debugger Main View. It contains a number of options and submenus that are described below. These options and submenus are active on the item you select in the source pane of the Main View window. Before using this menu, you should select an item by clicking on it. The following options and submenus are available:
| External Editor | |
Allows you to edit with an external editor such as vi, rather than the Debugger's default editor. | |
| Parse And Load | |
Parses your modified code and loads it for execution. You can execute the modified code by clicking on the Run or Continue command buttons in the Main View window. | |
| Update All Files | |
Launches the Save File+Fixes As dialog that allows you to update the current session while saving all the modifications to the appropriate files. | |
| Show Difference submenu | |
Allows you to show the difference between the original source and your modified code. You can show the difference in the code in one of the two following ways:
| |
| Enable submenu | |
Allows you to enable the changes in your modified code in one of the following ways:
| |
| Disable submenu | |
Has the same menu choices as the Enable submenu, but disables rather than enables. | |
| Save submenu | |
Allows you to save your code changes to a file. You can save the changes in one of the following ways:
| |
| Delete submenu | |
Has the same menu choices as the Save submenu, but deletes rather than saves. | |
| Show submenu | |
Allows you to launch any of the following windows:
| |
The Fix+Continue Error Messages window contains a list of errors and other system messages that pertain to your source modifications, parses, and attempts to run your modified source.
You can highlight the source line where the error occurred by double-clicking the appropriate line in the window. The Fix+Continue Error Messages window contains the following buttons:
| Clear | |
Clears all the parsing errors and warnings. | |
| Next | |
Puts a check mark on the next unchecked error warning entry in the parse messages. It displays the corresponding file and line in the Source view, highlighting it according to the type of error or warning. The Next option does not work after all the entries in the messages are ticked. | |
| Rescan | |
Erases all the ticks, so that you can rescan all the error warnings from the beginning. | |
The Admin menu allows you to perform either of the following operations:
| Clear All | |
Clears all messages in the window. | |
| Close | |
Closes the window. | |
The View menu allows you to set any of the following toggles:
| Show Warnings | |
Causes compile warnings to be displayed in the parse errors list. | |
| Append Parse Messages | |
Causes parse messages to be appended to the parse errors list. | |
| Append Load Messages | |
Causes load messages to be appended to the load errors list. | |
This section describes the Fix+Continue Build Environment window (see Figure A-63). The Fix+Continue Build Environment window provides you with the build information for your source code in your current environment. It displays the command that was used to build your executable and the name of the file that contains the function that you currently have selected.
The compiler and associated flags that were used to compile the file are normally gathered from the target. You can use this window to make any changes to these flags.
The window allows you to select your build environment setting through the Build Environment Setting toggle that contains the following two options:
| Default | Sets the build environment to default that is displayed in the window. |
| File Specific | Sets the build environment to that of the file that contains the currently selected function. You can change the file by clicking the Select File button, which launches the File dialog. |
The Fix+Continue Build Environment window also contains the following buttons:
| Select File | Launches the File dialog and allows you to select a file from which to set the build environment. |
| Clear | Clears the window. |
| Set | Sets the build environment to what is displayed in the window. |
| Unset | Unsets the build environment. |
| Done | Dismisses the window. |
When you use Fix+Continue, views change to show redefined functions or stopped lines containing redefined functions.
All Fix+Continue actions are available through the Fix+Continue menu on the Main View window. See Figure A-64, for details.
You can select commands from the Fix+Continue menu or enter them at the Debugger command line. The source code status is Read Only. Color coding shows the differences between editable code, enabled redefinitions, disabled definitions, and breakpoints. Line numbers in redefined functions have decimal notation that is used for every reference to the line number. The integer portion of the decimal is the same as the first line of the function. This ensures that compiled source code line numbers remain unchanged.
The Debugger command line interface accepts Fix+Continue commands and reports status involving redefined functions or files. Figure A-65, shows a function successfully redefined using the command line. Change id 1 was previously redefined and assigned the number 1.
The Call Stack recognizes redefined functions. It uses the decimal notation for line numbers, as shown in Figure A-66.
The Trap Manager recognizes redefined functions. It uses the decimal notation for line numbers, as shown in Figure A-67.
You can debug programs by entering dbx-style commands at the cvd> prompt found at the bottom of the Main View window (see Figure A-1). For more information, refer to the dbx User's Guide.
The syntax for the debugging commands is as follows:
| add_source [filename: line_number] | ||||||||||||||||||||||||||||||||||
(For C and C++ only, when compiled with -o32.) Prompts you to add source code lines (for example, add_source "fmain.c":15.2 ). line_number must be within the body of a function. Entering a period (.) specifies the end of your input. The source lines you provide are added after the specified line. This command returns an ID existing or new, depending on whether the function affected has already been changed or not. The resulting new definition of the function is executed on its entry next time. See also delete_source and replace_source. | ||||||||||||||||||||||||||||||||||
| alias [shortform command] | ||||||||||||||||||||||||||||||||||
Lists all aliases without arguments. With arguments, it assigns command to shortform. | ||||||||||||||||||||||||||||||||||
| assign expression1= expression2 | ||||||||||||||||||||||||||||||||||
Assigns expression2 to expression1. | ||||||||||||||||||||||||||||||||||
| attach pid | ||||||||||||||||||||||||||||||||||
Attaches to specified process ID (pid). | ||||||||||||||||||||||||||||||||||
| call function_name[argument... ] | ||||||||||||||||||||||||||||||||||
Executes the specified function with any arguments supplied. | ||||||||||||||||||||||||||||||||||
| catch [signal_name | all ] | ||||||||||||||||||||||||||||||||||
With no arguments, lists signals to be trapped. If a signal is specified, it's added to the list. If all is specified, it traps all signals. | ||||||||||||||||||||||||||||||||||
| clearcalls | ||||||||||||||||||||||||||||||||||
Cancels pending function calls. | ||||||||||||||||||||||||||||||||||
| cont in function_name | ||||||||||||||||||||||||||||||||||
Continues execution from the current line to the entry to the specified function. | ||||||||||||||||||||||||||||||||||
| cont to line_number | ||||||||||||||||||||||||||||||||||
Continues execution from the current line until the specified line, if there is not an intervening breakpoint to stop execution. | ||||||||||||||||||||||||||||||||||
| continue [all] | ||||||||||||||||||||||||||||||||||
Continues executing a program, or all processes, after a breakpoint. You can use both c and cont as aliases for continue. | ||||||||||||||||||||||||||||||||||
| continue [signal] | ||||||||||||||||||||||||||||||||||
Sends specified signal and continues executing a program after a breakpoint. | ||||||||||||||||||||||||||||||||||
| corefile [filename] | ||||||||||||||||||||||||||||||||||
With no arguments, reports whether data referencing commands reference a core file. If so, displays the current core file. With filename provided, specifies core file to be debugged. | ||||||||||||||||||||||||||||||||||
| delete [all | [trap_number] ,[trap_number], ...] | ||||||||||||||||||||||||||||||||||
Deletes all traps. The all option deletes all breakpoints. | ||||||||||||||||||||||||||||||||||
| delete_changes [[func_spec | -all] | [-file filename]] | ||||||||||||||||||||||||||||||||||
(For C and C++ only when compiled with -o32.) Deletes changes corresponding to the selected functions (for example, delete_changes getNumbers -file fmain.c). Once IDs are deleted, you will not be able to use the IDs again because the IDs associated with the selected functions are released. The default is -all. See also save_changes. | ||||||||||||||||||||||||||||||||||
| [delete_source filename :line_number] [, line_number] | ||||||||||||||||||||||||||||||||||
(For C and C++ only, when compiled with -o32.) Deletes the given line(s) if line_number or ,line_number (range) is within the body of a function. An example is:
This command returns an ID existing or new, depending on whether the function affected has already been changed or not. The resulting new definition of the function is executed on its entry next time. | ||||||||||||||||||||||||||||||||||
| delete trap_number [, trap_number, ...] | ||||||||||||||||||||||||||||||||||
Deletes the specified breakpoint numbered trap_number , as obtained from the list generated when the status command is issued. | ||||||||||||||||||||||||||||||||||
| detach | ||||||||||||||||||||||||||||||||||
Detaches from the current process. | ||||||||||||||||||||||||||||||||||
| disable all | ||||||||||||||||||||||||||||||||||
Deactivates all traps. | ||||||||||||||||||||||||||||||||||
| disable_changes [[func_spec | -all] | [-file filename]] | ||||||||||||||||||||||||||||||||||
(For C and C++ only, when compiled with -o32.) Disables specified changes for selected functions (for example, disable_changes getNumbers -file fmain.c. Nothing happens if the selected function is already disabled. The compiled definition of the function is executed on its next entry. You can invoke this command when the process is stopped or on a running process when a function entry breakpoint is set. | ||||||||||||||||||||||||||||||||||
| disable trap_number [, trap_number, ...] | ||||||||||||||||||||||||||||||||||
Deactivates the specified breakpoint numbered trap_number, as obtained from the list generated when the status command is issued. | ||||||||||||||||||||||||||||||||||
| display [expression, ... ] | ||||||||||||||||||||||||||||||||||
With expression, adds expression to the list of expressions displayed whenever the process stops. With no arguments, lists all expressions. See undisplay to delete an expression. | ||||||||||||||||||||||||||||||||||
| down [number] | ||||||||||||||||||||||||||||||||||
Moves down the specified number of frames in the call stack. down moves away from the direction of the caller. | ||||||||||||||||||||||||||||||||||
| dump | ||||||||||||||||||||||||||||||||||
Prints local variable values. | ||||||||||||||||||||||||||||||||||
| enable all | ||||||||||||||||||||||||||||||||||
Reactivates all inactive traps. | ||||||||||||||||||||||||||||||||||
| enable_changes [func_spec | -all] | [-file filename] | ||||||||||||||||||||||||||||||||||
(For C and C++ only when compiled with -o32.) Enables specified changes for selected functions (for example, enable_changes getNumbers -file fmain.c). Nothing happens if the selected function is already enabled. The latest accepted definition of the function is redefined on its next entry. You can invoke this command when the process is stopped or on a running process when a function entry breakpoint is set. | ||||||||||||||||||||||||||||||||||
| enable trap_number [[ ,trap_number, ...] | ||||||||||||||||||||||||||||||||||
Reactivates the specified breakpoint numbered trap_number, as obtained from the list generated when the status command is issued. | ||||||||||||||||||||||||||||||||||
| expression/[count] [ format] or expression, [ count] / [format] | ||||||||||||||||||||||||||||||||||
Prints the contents of the memory address specified by expression, according to the specified format. count represents the number of formatted items. The following format options are available:
| ||||||||||||||||||||||||||||||||||
| file [filename] | ||||||||||||||||||||||||||||||||||
Displays the name of the current or specified file ( filename). If a file is specified, it becomes the current file. | ||||||||||||||||||||||||||||||||||
| func [func_name] | ||||||||||||||||||||||||||||||||||
Moves to the source code corresponding to the specified frame in the call stack or to the function in the executable if not on the stack. | ||||||||||||||||||||||||||||||||||
| givenfile [filename] | ||||||||||||||||||||||||||||||||||
With no arguments, displays name of current object file. With filename, specifies object file to be debugged. | ||||||||||||||||||||||||||||||||||
| goto linenumber | ||||||||||||||||||||||||||||||||||
Skips over lines going directly to the specified line number in the current routine. Unlike dbx(1), cvd(1) does not begin execution at the specified line. | ||||||||||||||||||||||||||||||||||
| ignore[signal_name | all ] | ||||||||||||||||||||||||||||||||||
With no arguments, lists those signals not to be trapped. If a signal is specified, this command removes it from the list of signals to be trapped. If all is specified, ignores all signals. | ||||||||||||||||||||||||||||||||||
| kill[pid | all] | ||||||||||||||||||||||||||||||||||
Kills the specified process currently controlled by the Debugger or kills all processes. | ||||||||||||||||||||||||||||||||||
| list[from-line#[ :line_count]} [, to-line#] | [function_name]] | ||||||||||||||||||||||||||||||||||
Lists source lines beginning at from-line#. If no additional argument is specified, the default for line_count is 10. If line_count is specified, a total of line_count lines are listed. If function_name is specified, the lines from the given function are listed. | ||||||||||||||||||||||||||||||||||
| list_changes [func_spec | -all] | [-file filename] | ||||||||||||||||||||||||||||||||||
Lists one or more lines using the following syntax:
For example:
The default is list_changes -all. | ||||||||||||||||||||||||||||||||||
| next [int] | ||||||||||||||||||||||||||||||||||
Steps over the specified number of source lines. This command does not step into procedures. The default is one line. | ||||||||||||||||||||||||||||||||||
| nexti [int] | ||||||||||||||||||||||||||||||||||
Steps over the specified number of machine instructions. This command does not step into procedures. The default is one instruction. | ||||||||||||||||||||||||||||||||||
| print expression [, expression, ...] | ||||||||||||||||||||||||||||||||||
Prints the value of the specified expression(s). If the expression is a character pointer or array, both the string and address print. You can use p as an alias. | ||||||||||||||||||||||||||||||||||
| printd expression [, expression, ...] | ||||||||||||||||||||||||||||||||||
Prints the value of the specified expression(s) in decimal format. You can use pd as an alias. | ||||||||||||||||||||||||||||||||||
| printf string [, expression1 [, expression2, ]... ] | ||||||||||||||||||||||||||||||||||
Prints the value(s) of the specified expression(s) in the format specified by the string string. The printf command supports all formats of the IRIX printf command except %s. For a list of formats, see the printf(1) man page. | ||||||||||||||||||||||||||||||||||
| printo expression [, expression, ...] | ||||||||||||||||||||||||||||||||||
Prints the value of the specified expression(s) in octal format. You can use po as an alias. | ||||||||||||||||||||||||||||||||||
| printregs | ||||||||||||||||||||||||||||||||||
Prints the contents of the registers. | ||||||||||||||||||||||||||||||||||
| printx expression [, expression, ...] | ||||||||||||||||||||||||||||||||||
Prints the value of the specified expression(s) in hexadecimal format. You can use px as an alias. | ||||||||||||||||||||||||||||||||||
| pwd | ||||||||||||||||||||||||||||||||||
Displays the current directory. | ||||||||||||||||||||||||||||||||||
| quit | ||||||||||||||||||||||||||||||||||
Exits the debugging session. | ||||||||||||||||||||||||||||||||||
| redefine [func_spec [ -edit | -read] filename [ line_number,line_number]] | ||||||||||||||||||||||||||||||||||
(For C and C++ only.) Specifies a new body for a function. The new definition is checked, and errors (if any) are printed. The new function body is redefined on the next function entry. Breakpoints (if set) on the old definition are put on the new definition based on their relative line number position from the beginning of the function definition. (Note that some breakpoints may not make it to the new definition.) You can invoke this command when the process is stopped or on a running process when a function entry breakpoint is set. There are three ways to provide a new definition:
| ||||||||||||||||||||||||||||||||||
| replace_source [filename: line_number,[line_number]] | ||||||||||||||||||||||||||||||||||
(For C and C++ only when compiled with -o32.) Prompts you to type in replacement source if line_number or ,line_number (range) is within the body of a function. The source lines you provide replace the specified line(s). An example is: replace_source "fmain.c":12. This command returns an existing or new id depending on whether the function affected has already been changed or not. The resulting new definition of the function is executed on its entry next time. See also add_source and delete_source. | ||||||||||||||||||||||||||||||||||
| rerun | ||||||||||||||||||||||||||||||||||
Runs the program again using the same arguments. | ||||||||||||||||||||||||||||||||||
| return | ||||||||||||||||||||||||||||||||||
Continues executing the current procedure and returns to the next sequential line in the calling function. | ||||||||||||||||||||||||||||||||||
| run [[all] | argument_list ] | ||||||||||||||||||||||||||||||||||
Runs the program(s). If an argument_list is specified, it is used as the arguments to be supplied to the program. | ||||||||||||||||||||||||||||||||||
| runtime_check func_spec [ -options key [key,... ]] | ||||||||||||||||||||||||||||||||||
(For C and C++ only when compiled with -o32.) Enables all run-time checking options by default. If -options is specified, then run-time checking is restricted to the keys . The result of the runtime checks are printed the next time the specified function (func_spec) is entered. You can invoke this command on a stopped or a running process. | ||||||||||||||||||||||||||||||||||
| save_changes {func_spec| {-file filename}} [-[w|a]] filename_to_save | ||||||||||||||||||||||||||||||||||
(For C and C++ only when compiled with -o32.) Saves (enabled or disabled) function redefinitions or an entire file to another file (filename_to_save). The following example shows how to save a function definition:
If you specify the -file option, then before saving to filename_to_save, all function changes are applied to the compiled source of the file (with the condition that the file has had only its functions redefined, and has not been edited since the last build). An example of saving an entire file is the following:
The -w option replaces the filename_to_save . The -a option appends to the filename_to_save. An example of adding a function to a file is the following:
See also delete_changes. | ||||||||||||||||||||||||||||||||||
| setbuildenv [filename] compiler-flag-list | ||||||||||||||||||||||||||||||||||
(For C and C++ only, when compiled with -o32.) Overrides default build environment flags (compiler options). Without filename, the flags are passed along with -c -g flags to the compiler for any function in any file except those set separately with setbuildenv. An example is the following:
If filename is given, this command sets separate flags specifically for that file. For example, consider the following:
See also unsetbuildenv. | ||||||||||||||||||||||||||||||||||
| sh [shell_command] | ||||||||||||||||||||||||||||||||||
Calls a shell if no arguments; otherwise, executes the specified shell command. | ||||||||||||||||||||||||||||||||||
| showbuildenv [filename] | ||||||||||||||||||||||||||||||||||
(For C and C++ only, when compiled with -o32.) Lists all the build environment flags set. showbuildenv with a filename lists any build environment specifications that have been set separately with setbuildenv "filename". | ||||||||||||||||||||||||||||||||||
| show_changes [func_spec | -all |[-file filename]] | ||||||||||||||||||||||||||||||||||
(For C and C++ only, when compiled with -o32.) Prints the code of all enabled redefinitions of the specified function(s). The default is show_changes -all. See also enable_changes and disable_changes. | ||||||||||||||||||||||||||||||||||
| show_diff [func_spec | [ -file filename]] | ||||||||||||||||||||||||||||||||||
(For C and C++ only, when compiled with -o32.) Launches a xdiff comparing the compiled source and its latest redefinition for the specified function. If -file filename is specified, xdiff shows the difference between the compiled file and the file with all redefinitions applied to the compiled source of the file (with the condition that the file has had only its functions redefined, and has not been edited since the last build). | ||||||||||||||||||||||||||||||||||
| showthread [full] [thread] [ number | all] | ||||||||||||||||||||||||||||||||||
Shows brief status information about threads. If full is specified, prints full status information. You can request status information for a specific thread by number or you can request information for all threads. The thread qualifier does not affect command output. | ||||||||||||||||||||||||||||||||||
| source filename | ||||||||||||||||||||||||||||||||||
Executes commands in the specified file. | ||||||||||||||||||||||||||||||||||
| status | ||||||||||||||||||||||||||||||||||
Displays a list of currently set breakpoints and traces. | ||||||||||||||||||||||||||||||||||
| step [int] | ||||||||||||||||||||||||||||||||||
Steps the specified number of source lines. This command steps into procedures. The default is one line. | ||||||||||||||||||||||||||||||||||
| stepi [int] | ||||||||||||||||||||||||||||||||||
Steps the specified number of machine instructions. This command steps into procedures. The default is one instruction. | ||||||||||||||||||||||||||||||||||
| stop [all | pgrp] in [ filename] | ||||||||||||||||||||||||||||||||||
If set to all, stops all members of the specified process group whenever the trap is encountered. If set to pgrp, all members of the process group will apply the trap. | ||||||||||||||||||||||||||||||||||
| stop at [file] [ filename] [line] [ line_number] [if expression ] | ||||||||||||||||||||||||||||||||||
Traps at the specified line in the specified file. If the if option is used, the trap fires only if expression is true. If specified, the file name must be enclosed in double-quotation marks. As an example, to specify a stop at line 5 in myfile.c, the syntax is:
| ||||||||||||||||||||||||||||||||||
| stop exception [all | item]} | ||||||||||||||||||||||||||||||||||
Stops on all C++ exceptions or exceptions that throw the base type item. Do not include complex expressions using operators such as * and & in your type specification for an exception breakpoint. | ||||||||||||||||||||||||||||||||||
| stop exception [all | [item] [ , item]] | ||||||||||||||||||||||||||||||||||
Stops on all C++ exceptions or exceptions that either have no handler or are caught by an unexpected handler. If you specify item, stops on exceptions that throw the base type item . Do not include complex expressions using operators such as * and & in your type specification for an exception breakpoint. | ||||||||||||||||||||||||||||||||||
| stop in [filename:] function_name [if expression] | ||||||||||||||||||||||||||||||||||
Traps at the entry to the specified function. If the if option is used, then the trap fires only if expression is true. If the filename is given, the function is assumed to be in that file's scope. If specified, the filename must be enclosed in double-quotation marks. As an example, to specify a stop in function func1 in myfile.f only if n is 20, the syntax is:
| ||||||||||||||||||||||||||||||||||
| syscall [catch | ignore] [call | return] [sys_call_name | all ] | ||||||||||||||||||||||||||||||||||
The catch option adds a system call to the list of system calls to be trapped. The ignore option removes a system call from the system call trap list. The call option specifies the entry to the system call and return signifies the return from the call. | ||||||||||||||||||||||||||||||||||
| [trace [variable] at filename | line_number ] | function_name \ [ if expression] | ||||||||||||||||||||||||||||||||||
Traces the specified variable. You can specify a file and/or test condition. You can also specify a line number or a function where the trace is to take place. | ||||||||||||||||||||||||||||||||||
| unalias aliasname | ||||||||||||||||||||||||||||||||||
Cancels the alias specified as aliasname. | ||||||||||||||||||||||||||||||||||
| undisplay [[displaynumber, ...] | ||||||||||||||||||||||||||||||||||
Stops display of expression with specified displaynumber when the process stops. Removes the expression from the display list. | ||||||||||||||||||||||||||||||||||
| unsetbuildenv[filename] | ||||||||||||||||||||||||||||||||||
(For C and C++ only, when compiled with -o32.) Disregards the default build environment flags if specified earlier. For all functions in files that don't have an overriding build environment, unsetbuildenv passes only the -c and -g flags. If filename is given, this command disregards the build environment flags specified for the file earlier. Further redefinition of the functions in the file use the default build environment flags, if set. See also setbuildenv. | ||||||||||||||||||||||||||||||||||
| up [number] | ||||||||||||||||||||||||||||||||||
Moves up the specified number of frames in the call stack. up moves in the direction of the caller. | ||||||||||||||||||||||||||||||||||
| use [path] | ||||||||||||||||||||||||||||||||||
Uses the specified path to search for source files. | ||||||||||||||||||||||||||||||||||
| watch identifier [write | read] | ||||||||||||||||||||||||||||||||||
Causes program to stop when the identifier is written or read, depending on whether write or read is specified. If neither is specified, the default is write. | ||||||||||||||||||||||||||||||||||
| whatis identifier | ||||||||||||||||||||||||||||||||||
Displays all the qualifications of the specified variable. | ||||||||||||||||||||||||||||||||||
| when at [filename] [ line_number] [command] [ command] ... | ||||||||||||||||||||||||||||||||||
When your program reaches the specified line_number , the commands specified are executed before the program resumes execution. | ||||||||||||||||||||||||||||||||||
| when in [filename] function_name [command] [ command] ... | ||||||||||||||||||||||||||||||||||
When your program enters the specified function, the commands specified are executed before the program resumes execution. | ||||||||||||||||||||||||||||||||||
| which [identifier] | ||||||||||||||||||||||||||||||||||
Displays the qualification of the specified variable. | ||||||||||||||||||||||||||||||||||
| where [thread | thread-id] | ||||||||||||||||||||||||||||||||||
Performs a stack trace showing the activation levels of a program or, optionally, of the specified thread. You can obtain thread-ids from the first column of output of the showthread command. | ||||||||||||||||||||||||||||||||||
The following are the kernel system calls (syscalls) that actually block continued pthreads. There are numerous library routines, such as printf, that can use one of these blocking system calls.
It would be impractical here to list all library routines which utilize a blocking syscall. Nevertheless, as a user you should know, for example, that if you call the printf library routine it eventually calls writev(), a blocking system call, and thus may block continued pthreads.
| accept | |
accept a connection on a socket | |
| close | |
close a file descriptor | |
| creat | |
create a new file or rewrite an existing one | |
| dmi | |
SGI specific. Used to implement the interface defined in X/Open document Systems Management: Data Storage Managment (XDSM) API . | |
| fcntl | |
File and descriptor control. Provides for control over open descriptors. | |
| fsync | |
synchronize a file's in-memory state with that on the physical medium | |
| getmsg / getpmsg | |
get next message off a stream | |
| ioctl | |
Control device. Performs a variety of control functions on devices and streams. | |
| lockf | |
Record locking on files. Allows sections of a file to be locked. | |
| mq_open | |
open/create a message queue | |
| msgsnd / msgrcv | |
message send and message receive | |
| msync | |
synchronize memory with physical storage | |
| nanosleep | |
high resolution sleep | |
| open | |
open for reading and writing | |
| pause | |
suspend process until signal is received | |
| poll | |
input/output multiplexing | |
| putmsg / putpmsg | |
send a message on a stream | |
| read / readv / pread | |
read from a file | |
| recv / recvfrom / recvmsg | |
receive a message from a socket | |
| select | |
synchronous I/O multiplexing | |
| semget / semctl / semop | |
semaphore handling | |
| send / sendto / sendmsg | |
send a message from a socket | |
| sginap | |
times sleep and processor yield function | |
| write / writev / pwrite | |
write on a file | |