You can run Prism in a commands-only mode, without the graphical interface. This is useful if you don't have access to a terminal or workstation running X. All Prism functionality is available in commands-only mode except features that require graphics (for example, visualizers). See " Specifying the Commands-Only Option".
If you are using an Xterm, you can also run a commands-only version of Prism that lets you redirect the output of certain commands to X windows. This may be preferable to users who are used to a command-line interface for debugging, but want to take advantage of some of Prism's graphical features. See " Running Commands-Only Prism From an Xterm: The -CX Option".
For further information on individual commands, read the sections of the main body of this guide dealing with the commands, and read the reference descriptions in the Prism 6.0 Reference Manual.
To enter commands-only mode, specify the -C option on the prism command line. You can also include other arguments on the command line; for example, you can specify the name of a program, so that Prism comes up with that program loaded. X toolkit options are, of course, meaningless. See " Prism Options"" for more information on command-line options.
When you have issued the command
% prism -C -n 4 a.out
you receive this prompt:
(prism all)
You can issue most Prism commands at this prompt, except for commands that apply specifically to the graphical interface; these include pushbutton, tearoff, and untearoff.
You operate in commands-only Prism just as you do when issuing commands on the command line in graphical Prism; output appears below the command you type, instead of in the history region above the command line. You cannot redirect output using the on window syntax. You can, however, redirect output to a file using the @ filename syntax.
Commands-only Prism supports the editing key combinations supported by graphical Prism, plus some additional combinations. Here is the entire list:
When printing large amounts of output, commands-only Prism displays a more? prompt after every screenful of text. Answer y or simply press the Return key to display another screenful; answer n or q, followed by another Return, to stop the display and return to the (prism) prompt.
You can adjust the number of lines Prism displays before issuing the more? prompt by issuing the set command with the $page_size variable, specifying the number of lines you want displayed. For example, issue this command to display 10 lines at a time:
(prism) set $page_size = 10
Set the $page_size to 0 to turn the feature off; Prism will not display a more? prompt.
This section describes some commands that are especially useful in commands-only Prism.
Use the list command to list source lines from the current file. For example,
(prism) list 10, 20
prints lines 10 through 20 of the current file.
Use the show events command to print the events list. Use the delete command to delete events from this list.
Use the set command with the $print_width variable to specify the number of items to be printed on a line. The default is 1.
Issue the quit command to leave commands-only Prism and return to your Solaris prompt.
Issue the prism command with the -CX option from an Xterm to start up a commands-only Prism that lets you redirect the output of certain commands to X windows. The information presented earlier in this chapter about commands-only Prism also applies to this version, except that this version lets you redirect output using the on window syntax.
You can redirect the following output to X windows:
To redirect the output, issue the appropriate command with the on dedicated or on snapshot syntax, just as you would in graphical Prism. For example, this command displays a visualizer for x in a dedicated window:
(prism) print x on dedicated
In addition, you can display help windows from within windows that you pop up in this way.