USDA ARS

Debugging IPW Programs

To facilitate the development of IPW programs, a special target is provided to make a version of an IPW program for debugging purposes:

     make debug
When this target is used, a debugging version of the program is constructed using the C compiler's "-g" option. This version is located in a subdirectory of the program's source directory called "Debug". Also located in this subdirectory are the debugging versions of the program's object files.

Because most debugging efforts are focused on the program's source code, the debugging version of the program is linked with non-debugging versions of the IPW libraries, i.e., those versions that are constructed as part of a standard installation of IPW. However, if more comprehensive debugging is required, a second debugging version of the program can be built by linking with debugging versions of the IPW libraries:

     make debug.all
This target creates a debugging version of the program with the extension ".all" in the "Debug" subdirectory. For example, if the program is named "foo", then the debugging version of the program linked with the debugging versions of the IPW libraries would be "Debug/foo.all".

Note that the debugging versions of IPW libraries are not constructed as part of a standard installation. Therefore, in order to be able to use the "debug.all" target, the debugging versions of the libraries used by a program must already exist. Creating debugging versions of IPW libraries is described in the libraries section of this guide.


IPW documentation / Last revised 20 May 2009 / IPW web site