SBROWSER(1) — USER COMMANDS
NAME
sbrowser — OpenWindows interface to Sun SourceBrowser
SYNOPSIS
sbrowser
AVAILABILITY
Available with ANSI C and Sun FORTRAN, Pascal, C++, and Assembler
DESCRIPTION
sbrowser is the OpenWindows interface to SourceBrowser, a source-level code browser. To collect data for SourceBrowser, add the SourceBrowser option to the compiler command line. Use:
−xsb for ANSI C programs (for SunOS 5.0 only)
−sb for FORTRAN 77, Pascal, ANSI C, and C++ programs (for SunOS 4.1.x only)
−b for Assembler programs (for SunOS 4.1.x and 5.0)
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 SPARCworks Tools 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.
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.
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 us 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 understand 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.
If the SPARCworks Answerbook product is available on your system, you can read the manual Browsing Source Code on-line and take advantage of dynamically linked headings and cross-references.
ENVIRONMENT
Environment variables store information SourceBrowser needs to know to browse the database.
HOME The name of the user’s login directory.
HELPPATH The path for the SourceBrowser help files, SourceBrowser.info, CallGrapher.info, ClassGrapher.info, and ClassBrowser.info.
PWD The full pathname of the 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
sbbuild(1), sbquery(1), .sbinit(5), sparcworks(1)
Browsing Source Code
Managing SPARCworks Tools
Sun Release 4.1 — Last change: 18 March 1992