Motif-Based MAINSAIL Tools Reference Guide, Chapter 1

previous   next   top   contents   index   framed top   this page unframed


1. Introduction

This document describes the Motif-based graphical user interface (GUI) to the MAINSAIL environment. The environment includes an integrated executive, debugger, and text editor, and allows you to invoke graphical performance monitoring tools.

XIDAK's primary design goal for the GUI was to make debugging and performance monitoring of MAINSAIL programs as easy to learn as possible.

In addition to the current GUI, the MAINSAIL debugger, MAINDEBUG, also has a line-oriented interface and an interface closely integrated with MAINEDIT (MAINEDIT is the MAINSAIL text editor, which can be run on terminals for which XIDAK has implemented a display MODULE). Unfortunately, both of these interfaces require learning a set of textual commands, which are difficult to remember, especially for programmers who debug MAINSAIL programs only occasionally. XIDAK hopes that the current GUI will make the task of debugging easier for such users.

This document assumes that you are familiar with how to compile and run a MAINSAIL program, but not necessarily that you have used MAINDEBUG. It assumes a general familiarity with the X Window System (at least enough to run it) and with your window manager (which need not be the Motif window manager, even though MAINDEBUG uses the Motif widgets). Appendix B contains further information about the GUI's relationship to X and Motif, if you are interested (you may need to configure the font used by the GUI if the default font is not fixed-width, among other changes you might want to make).

The GUI is implemented using the Motif software available from Open Systems Foundation (OSF) and requires Motif release 1.1 or later. Motif in turn uses the X and Xt software available from MIT and requires release X11R4 or later. This release was developed and tested on a Sun IPC (Sparc) using standard installations of Motif 1.1.1 and X11R4. It was developed on a color monitor, but should run correctly on a black-and-white monitor as well.

The current set of commands and layout of windows is likely to change in future releases of MAINSAIL as XIDAK tries to make the GUI even easier to use. XIDAK welcomes comments about the GUI, information about any problems that occur, and suggestions about how to improve the GUI.

Figure 1–1. To Get Started Quickly with the GUI Debugger
For users experienced with both MAINDEBUG and Motif, the GUI debugger is largely self-explanatory. If you are such a user, and want to familiarize yourself with it quickly:

  • Run the MODULE MTFEXE.

  • Examine the contents of each of the menus in the menu bar. Most of the commands available there are similar to commands in the line- and display-oriented debugger interfaces. Try out any command that interests you.

  • Refer to this manual as necessary when you encounter unfamiliar commands or if a menu item does not behave as you expect.

1.1. MAINDEBUG User Interfaces

In addition to the GUI interface, the MAINSAIL debugger has two other interfaces, a line-oriented interface and a display-oriented editor-based interface. Both interfaces are described in the MAINDEBUG User's Guide.

The line-oriented interface is conceptually the simplest user interface. The debugger prompts for the next command to execute and displays information by writing lines to the terminal. While this user interface is simple to implement and suitable for any character-based display, it does not provide much feedback or visual context during execution; only one line of source code is displayed during single step or at a breakpoint. There is no provision for reviewing output that scrolls off the screen during the course of a debug session.

The display-oriented user interface makes use of MAINEDIT, a full-screen text editor. This interface provides more visual context: an entire screen of source is displayed during single step or at a breakpoint. Information displayed by the debugger is written to a scrollable edit buffer and can be reexamined whenever desired. The tight integration with MAINEDIT is both a strength and a weakness. Having a full text editor at your disposal during the debug session makes it easy to navigate through the source text while debugging and easy to fix bugs as they are found without leaving the debug session; however, you must know the MAINEDIT commands to use this interface effectively. Also, it can become confusing whether you are giving a debugger command or controlling the underlying text editor since the same keystrokes are used for both.

MAINEDIT has three “front ends” that allow it to interpret different command sets:

The graphical user interface provides even more visual context than the display-oriented user interface, and its command interaction is much easier for the new user to learn. The GUI is implemented using Motif and interacts through popup windows, menus, and buttons. All interaction with these objects follows the standard Motif conventions.

1.2. How the Motif GUI Is Built

The first step in creating a GUI for MAINDEBUG was to create a GUI for MAINEDIT. This is implemented using an X-specific display MODULE, XDPY. If MAINEDIT is run with the XDPY display MODULE, a Motif window is created with a menu bar, push buttons, and an area for scrollable edit windows. The current GUI therefore bears some resemblance to the MAINEDIT-based display interface. In future releases, the presence of MAINEDIT may be hidden more completely to make MAINDEBUG look like a more typical Motif application. However, enough menu-based commands are in the current GUI to allow you to navigate through the source text and do simple text editing without having to learn the non-GUI character-based editor commands.

The second step was to build a GUI front end for the debugger that shares the GUI editor window; it simply adds more controls to the GUI editor window. You still have direct access to all the editor commands of any of the front ends, so that, for example, a vi user can get all the advantages of the GUI debugger and at the same time use the vi front end to navigate through source text and edit files.


previous   next   top   contents   index   framed top   this page unframed

Motif-Based MAINSAIL Tools Reference Guide, Chapter 1