Using Sun WorkShop

Understanding sbtags

The sbtags command collects a subset of the information available through compilation. The reduced information restricts some browsing functionality. A database generated by sbtags enables you to perform queries on functions and variables and to display the function call graph.

A tags database:

Once a file has been changed, it often need not be scanned again to incorporate changes into the database.

An sbtags database is based on a lexical analysis of the source file. Though it does not always correctly identify all the language constructs, it will operate on files that will not compile and is faster than recompilation.

sbtags recognizes definitions for variables, types, and functions. It also collects information on function calls. No other information is collected (in particular, other semantic information for complex queries is not collected).

The functionality of sbtags is similar to ctags and etags, except for the Call Grapher information. You may mix direct queries to the database for definitions and graphing with pattern-matching queries.

With an sbtags generated database: