Using SoftBench Static Analyzer

Starting SoftBench Static Analyzer

Starting SoftBench Static Analyzer

You can start SoftBench Static Analyzer from the main SoftBench window, from your configured editor, or from SoftBench Debugger. In the main SoftBench window, select the "Static Analyzer" icon in the toolbar, or choose "File: Static Analysis…". SoftBench Static Analyzer starts, displaying all your project's functions. SoftBench Static Analyzer focuses its queries on the current project.

Once you start SoftBench Static Analyzer, you can explore the project's source code with queries on the "Show" menu, or with specific "Identifier" queries on the "Symbol" menu. Commands on the "Show" menu display all symbols in the project for a given category. For example, you can show all functions, all classes, and all global variables.

Commands on the "Symbol" menu require an identifier in the "Symbol ()" input box. You can type a symbol name directly in the "Symbol ()" input box, or you can select a list item from a previous query which automatically copies the relevant symbol into the input box. For example, you select a specific global variable, then choose "Symbol: References ()" to display all references to the selected global variable. When you execute a Static query from the configured editor or SoftBench Debugger, select the symbol of interest, then choose a command from the "Static" menu. The "Static" menu in the editor and SoftBench Debugger equates to the "Symbol" menu in SoftBench Static Analyzer.

Within SoftBench Static Analyzer you can choose between textual and graphical queries.

Textual Queries

The main SoftBench Static Analyzer

 

window provides facilities for making

 

textual query requests, displaying

 

the results in a list, and browsing the

 

results in the editor.

Graphical Queries

The Static Graphs provide facilities

 

for making query requests, displaying

 

the results graphically, and browsing

 

the results in the editor.

Textual queries via the "Show" and "Symbol" menus are effective while you are learning about the identifiers, such as functions and global variables, used in your code. Graphical queries are effective when you

252

Chapter 9

Page 252
Image 252
HP UX SoftBench Software manual Starting SoftBench Static Analyzer, 252