Using SoftBench Static Analyzer

Preparing to Make Queries

Preparing to Make Queries

To use SoftBench Static Analyzer effectively you must first understand some simple preparation concepts:

Generating Static Data

Specifying What Data to Analyze

Generating Static Data

Before you can use SoftBench Static Analyzer for program understanding, you must first generate Static information about your application by parsing code and creating a Static database. The best way to generate the Static information is from the SoftBench main window:

1.Set the "Static" compile mode toggle button. This action adds the "-y" compile flag to the build options.

2.Select the project or target of interest in the project browser or target graph.

3.Select Build.

4.When the build completes successfully, select the "Static Analyzer" icon from the toolbar. SoftBench Static Analyzer appears with all your program's functions displayed in the query results area.

If your program contains compile errors, the compiler may not be able to generate complete Static information. The compiler analyzes your program as well as it can and generates Static information based on that analysis. This may result in incomplete or missing information. For example, a serious compile error may result in all Static information for a function being discarded. In a less serious case, the compiler may discard the Static information for a specific identifier. You can still use SoftBench Static Analyzer with this incomplete information, but SoftBench Static Analyzer cannot display complete information in these situations. Correct the compile errors and recompile your program to ensure SoftBench Static Analyzer has complete information.

Static databases from previous releases of SoftBench are not compatible with the current Static database format. You must remove and regenerate your static database.

254

Chapter 9

Page 254
Image 254
HP UX SoftBench Software manual Preparing to Make Queries, Generating Static Data, 254