canalyze
is a tool that integrates the analyzer into the
building process. Although the analyzer can be used directly from the command
line, it is hard to use it to analyze a software package, which may have
complex compiling options and building processes.
canalyze works in three steps: logging, preprocessing, and analyzing. The
general form of the canalyze command is:
canalyze command options
In this step, the whole building process is recorded. The current directory should be the package building directory. The command is:
canalyze log -dir datadir
Option -dir
specifies the directory that will be used to store
various analysis data. This option is required by every canalyze command.
-build
is another option for log. It specifies the building
command. The default value is 'make'
.
After logging the building process, Canalyze needs to call native compiler to emit preprocessed source code. The command is:
canalyze preprocess -dir datadir
Option -compiler
specifies the native compiler command. It
defaults to gcc
for C code. You may specify another compiler, for
example, arm-linux-gcc
.
The command doing analysis is:
canalyze analyze -dir datadir
The generated bug reports will be in
directory datadir/report/datetime
.