C programmer's productivity tools

C programmer's productivity tools

This chapter will teach you how to use the C Programmer's Productivity Tools (CPPT). Step-by-step instructions are provided through basic examples, so you can start using these tools right away. Additional examples demonstrate various options that allow you to make the best use of the tools.

The chapter is organized as follows:

The CPPT package consists of two tools: cscope, a browser, and lprof, a profiler.

The cscope(CP) browser is an interactive program that locates specified parts of code in a set of C source files and allows you to edit the files. It can reduce significantly the amount of time you must spend searching for functions, function calls, macros, and variables in the code. It is especially helpful for a programmer working on unfamiliar code.

A profiler is a tool for analyzing a program's run-time behavior, a procedure known as dynamic analysis. The lprof(CP) tool allows a programmer or tester to identify those parts of the source code that are most often executed and those that are never executed when a program is run. It provides line by line frequency profiling, reporting how many times each line of source code is executed. You can request test coverage analysis so that lprof only reports which lines of code are not executed at run time. lprof can be used over a set of tests such as a test suite.

Next topic: lprof

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003