Introduction

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

Logging

In this step, the whole building process is recorded. 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'.

Preprocessing

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.

Analyzing

The command doing analysis is:

canalyze analyze -dir datadir

The generated bug reports will be in directory datadir/report/datetime.

Example

A complete analysis may consist of the following steps:
  1. canalyze log -dir ~/data/foo -build 'make'
  2. canalyze preprocess -dir ~/data/foo
  3. canalyze analyze -dir ~/data/foo