Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sbrowser(1) — Sun WorkShop 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sbcleanup(1)

sbquery(1)

sbtags(1)

sbinit(4)

sparcworks(1)

SBROWSER(1)  —  USER COMMANDS

NAME

sbrowser −  OpenWindows interface to Sun SourceBrowser

SYNOPSIS

sbrowser [ −editor ] [ −query symbol ]

AVAILABILITY

Available with ANSI C and Sun FORTRAN, Pascal, C++, and Assembler, for 5.2 and later releases on Solaris 2 and for 4.1.1 and greater for Solaris 1, running OpenWindows 3.0_U1 or OpenWindows 3.0 with patch 100626. 

DESCRIPTION

sbrowser is the OpenWindows interface to SourceBrowser, a source-level code browser.  To collect data for SourceBrowser, use the scanner, sbtags or add the SourceBrowser option to the compiler command line.  Use:

−xsb for ANSI C programs,
−sb for FORTRAN 77, Pascal, and C++ programs,
−b for Assembler programs. 

To start SourceBrowser from a command or shell tool, type sbrowser at the command prompt. 

You can also start SourceBrowser from the SPARCworks Manager.  See Managing the Toolset for details on using SourceBrowser with the SPARCworks Manager. 

You must run SourceBrowser in the directory in which you compiled your program.  To change directory from within SourceBrowser, click on the current directory name, enter the new path name and press Return. 

SourceBrowser consists of four windows: the SourceBrowser base window, CallGrapher, ClassGrapher, and ClassBrowser. 

In the SourceBrowser base window, you issue queries, which instruct SourceBrowser to find all occurrences of the symbol you have identified.  To issue a query, type the symbol name in the Text field and press Return.  If −query symbol is used, the browser will start a query on symbol upon startup. 

The SourceBrowser base window is normally used to present source information in a text subwindow.  If the −editor flag is given, the SourceBrowser base windows does not contain a text subwindow and the SourceBrowser components instead issues ToolTalk requests asking for the presentation of sources in an external editor. 

SourceBrowser includes two commands for narrowing a search. The Filter command lets you search for symbols based on how they are used in a program.  For example, you could limit your search to declarations of variables. The Focus command lets you limit your search to instances of specific units of code, such as particular programs, functions, or libraries.  Manipulation of Filter and focus is accessible under the Query pulldown menu. 

Some filters are used more frequently than others; these filters can be accessed directly under Query.  There are currently four such filters (All, Declarations, References, and Grep); they all are temporary filters, applied only for the duration of the query and not interfering with the (permanent) filter set using Filter.  Setting of focus is independent of setting of filter and is permanent. 

The CallGrapher lets you graphically identify the interrelationships of the functions in your program.  Similarly, the Class Grapher lets you visualize the class hierarchy in C++ programs.  Both Graphers include basic commands for expanding and contracting the graph.  They also let you issue a query on any function or class in the graph and view a function or class with its surrounding source code in the SourceBrowser window. 

The ClassBrowser lets you browse through C++ source code and libraries.  You can view the defined classes and their data and function members.  By navigating through the classes in the source code and libraries, you can see how the classes were defined and used, and reuse them if possible. 

SourceBrowser’s spot help provides context-sensitive help for each control and area in the tool.  To get help on using SourceBrowser, move the pointer onto the object for which you want help and press the Help key.  Use this key to get help on error messages. 

Selecting the About button provides general introductory information about the SourceBrowser. 

If the SPARCworks Answerbook product is available on your system, you can read the manual Browsing Source Code on-line and take advantage of hyper-text browsing features. 

ENVIRONMENT

Environment variables store information SourceBrowser needs to know to browse the database. 

HOME The name of the user’s login directory. 

HELPPATH The (optional) path for the SourceBrowser help files, SourceBrowser.info, CallGrapher.info, ClassGrapher.info, and ClassBrowser.info. 

PWD The full pathname of the initial current directory. 

SUNPRO_SB_ATTEMPTS_MAX
The maximum number of times the index builder will try to access a locked database.

SUNPRO_SB_EX_FILE_NAME
The absolute pathname of the file sun_source_browser.ex. 

SUNPRO_SB_INIT_FILE_NAME
The absolute pathname of the .sbinit file. 

SEE ALSO

sbcleanup(1), sbquery(1), sbtags(1), sbinit(4), sparcworks(1)

Browsing Source Code

Managing the Toolset

Sun Release 4.1  —  Last change: 06 Jun 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026