Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



ProgramChecker


Overview

ProgramChecker is a command-line tool that checks the Symbian OS APIs used by a Symbian program (e.g. .exe, .dll, .app, etc.), or a set of programs.

By running this tool you can, for example, check whether any deprecated APIs have been used. You can also check the usage of APIs according to the Interface Management classifications described in the API classification document. (For more details on this document and what it contains, see the Interface Management report within the Tools and Utilities section.)

[Top]


How to use ProgramChecker

To use the ProgramChecker tool from the command line, you need to specify the executable to be analysed, the set of target libraries to compare against, and the interface management access or status levels to be included in the comparison.

The workflow is as follows:

1.

Identify the executable (.exe) or a set of executables to be checked. If checking a set of executables, list their full path names in a text file.

2.

Identify either:

  • The target library or set of libraries against which coverage will be analysed. If defining a set of libraries, list their full path names in a text file.

    For example, to analyse the usage of all Symbian OS APIs, type the following from the command line:

    > dir /b /s \epoc32\release\arm4\urel *.lib > \lib.txt

    This will create a lib.txt file in the root directory, listing all Symbian OS libraries.

or:

  • A technology, subsystem or component in conjunction with a API classification document.

    For more details on these categories, see the Interface Management report within the Tools and Utilities section.

or:

  • The platform, by using the -p option from command line. The tool then finds the library directory for that particular platform.

3.

Identify the classification access or status levels of APIs to be checked. For example, if deprecated status is specified, only the usage of deprecated APIs is reported.

Optionally provide the path of a valid classification document for your Symbian OS release.

4.

Provide the platform for the executable to be checked, e.g. arm4, armi, or thumb. If not specified, the default is arm4.

5.

Provide the name of the HTML file where all the results should be stored (optional). If not specified, a report called ProgramCheckerReport.html will be created by default in the current working directory.

[Top]


Command line syntax

When using the ProgramChecker tool, you specify all the various options described above from the command line using the following syntax, from any location on your epoc32 drive:

> programchecker [required parameter] [optional parameter]


Required parameters

These are the parameters that must be specified with the programchecker command.

Parameter

Description

-b <binary/text file>

Executables to be analysed for API usage.

-B <reference libs>

A single .lib file or a text file containing a list of .lib files. The -B option takes precedence over the -T, -S and -C options.

-T <technology>

Specifies a technology area.

-S <sub-system>

Specifies a sub-system.

-C <component>

Specifies a component.

-a <interface-access>

Defines the interface access category to be analysed, e.g. all, internalTechnology, internalComponent, publishedPartner, and publishedAll.

-s <interface-status>

Defines the interface status category to be analysed, e.g. all, released, deprecated, prototype, or test.

-p <platform>

The platform for the executable to be analysed, e.g. ARMI, ARM4, THUMB. Default option is ARMI.

-r <report file>

Name of HTML file displaying the results.


Optional parameters

The following parameters can optionally be specified with the programchecker command.

Parameter

Description

-h

Displays help information.

-c <classification-doc>

The XML document containing API classifications.

-C <component>

Specifies a component.

-j <joining operator>

The logical operator (AND/OR) to be used when matching interface-access and interface-status categories. Default option is OR.

-d <tempdir>

Temporary location for intermediate output files. If not specified, a directory (_ProgramCheckerTemp) will be created in the current working directory by default (and deleted upon process completion).

-l <log file>

Name of log file containing errors and warnings etc., for debugging purposes.

[Top]


Example

A full example of how to use the Program Checker tool is shown below:

> programchecker -b myApp.exe -B myTargetLibraries.txt -a all -s all -p arm4 -j -r myReport.html

[Top]


Report file format

Once you have generated a report using the ProgramChecker tool, an HTML report is created. The default name is ProgramCheckerReport.html.

The results are displayed in a Summary and Details section, described below.


Summary

The Summary section lists the name of the platform specified (-p), the Interface access (-a) and Interface status (-s) levels specified, as well as the API classification document used (if any). The overall percentage of the target libraries that include Symbian OS APIs is also listed.


Details

The Details section lists the name and location of the executables analysed (-b) and the target libraries (-B) they have been compared against. It also provides the names of the Symbian OS APIs used.