gnatsync(1) The GNAT global dependency detector

SYNOPSIS

gnatsync [OPTION]... filename [-cargs gcc_switches]

gnatsync [OPTION]... -files=filename [-cargs gcc_switches]

DESCRIPTION

gnatsync is the GNAT static analysis tool that helps to detect potential race conditions in multitasking programs, by exposing the global data that is accessed in unsynchronized manner by independent threads or Ada tasks.

Input to gnatsync is a set of compilable Ada sources that constitutes a complete program. As it output, the tool prints out a list of a data objects for which potential unsynchronized access is detected, and for each such object the tool provides a list of threads that access this object. Each access is specified by a full sequence of subprograms calls when a given thread does not reference the object directly.

gnatsync is an ASIS-based tool. It compiles the given sources to create the corresponding tree files. All these compilations take place in a temporary directory, which is created in the beginning of a gnatsync run and is deleted when the processing of the argument sources is completed. If a source file specified as gnatsync argument does not contain a legal Ada program unit, that is to say if the program has syntactic of semantic errors, gnatsync cannot process it. If the specified source contains an Ada unit which depends on Ada units located in other directories, the user can either specify the source search path by means of a -I option in '-cargs' section of gnatsync parameters, in the same way as the source search path can be specified for GNAT. This is not needed if gnatsync is called from the GNAT driver with the corresponding project file.

In the first form, gnatsync examines the specified Ada source files (wildcards are allowed).

In the second form, gnatsync examines the Ada source files listed in the specified file.

OPTIONS

-a
Process RTL units.
-cargs gcc_switches
Pass gcc_switches to GCC when producing the tree files.
-d
Debug mode.
-dd
Progress indicator mode, for use in the GNAT Programming Studio.
-main=filename
Specify file containing main subprogram
-o(s|m|f)
Output detail level: s=short, m=medium (the default), f=full.
-out_file=filename
Send output to filename.
-q
Quiet mode: do not report detections on standard output.
-t
Output execution time.
-threads=filename
Specify file describing foreign threads
-v
Verbose mode.
-wq
Turn warnings off.

PROJECT FILE SUPPORT

gnasync can be applied to any set of sources, but it can produce useful and complete results when called to a set of sources that make up a complete program. The most convenient way to specify such a set of sources is a project file. gnatsync can be called from the GNAT driver as other tools, so the most practical way of invoking the tool is:
gnat sync -Pproj -U [options]

AUTHOR

gnatsync was written by AdaCore (http://www.adacore.com).

This manual page was written by Ludovic Brenta <[email protected]> for the Debian project, from gnatsync's README file.

COPYRIGHT

gnatsync is Copyright (c) 2007-2009 AdaCore

This manual page is Copyright (C) 2009 Ludovic Brenta <[email protected]>.