C and C++ SoftBench User's Guide

Using SoftBench Static Analyzer
Using SoftBench Static Analyzer in Standalone Mode
Chapter 9 273
Using SoftBench Static Analyzer in
Standalone Mode
This section describes using SoftBench Static Analyzer from the
command line. When you start SoftBench Static Analyzer from the
command line, it has no knowledge of your project data. To access project
data, start SoftBench Static Analyzer from the main SoftBench window
or from the editor or SoftBench Debugger when they are started from the
main SoftBench window.
Generating Static Data from the Command Line
If you build your application outside of SoftBench, you need to use the
"-y" compile option. This flag causes your compiler to generate a Static
database, even when you build outside of SoftBench. To generate Static
information without rebuilding the application, use "-y -nocode".
SoftBench Static Analyzer provides the ability to generate Static data
by parsing your code without first compiling it. To generate Static data
without compiling, choose "File: Analyze File Set" in SoftBench
Static Analyzer. This data is not as reliable as compiled data, nor is
SoftBench Static Analyzer as reliable in knowing how to generate this
data.
Searching Subdirectories
When you use SoftBench Static Analyzer in project-aware mode,
SoftBench knows where to find the source files in the project. In contrast,
in standalone mode, SoftBench Static Analyzer looks in the current
working directory and in any other files and directories specified in the
analysis file set.
Additionally, in standalone mode, SoftBench Static Analyzer provides a
short cut for analyzing a multi-directory application. To recursively
search all subdirectories below a specified directory, choose "Options:
Behavior Settings…" and select " Recursively Search
Subdirectories". This setting causes SoftBench Static Analyzer to
recursively search all directories listed in the analysis file set.