Quick Start
The following is an example of the steps required to gather information about your
code and how to view the results with Code Analyzer, using a sample C program.
Quick Start
-
Compile a program to collect static data.
% cc -xprevise=yes *.c
Note -
Previously, you could compile with the –xanalyze=code
option. This option is still valid for Oracle Developer Studio12.5 but is
EOL.
-
Recompile program with debug information.
% cc -g *.c
-
Instrument program with discover and run program to
collect dynamic memory access data.
% cp a.out a.out.save
% discover -a a.out
% a.out
-
Instrument program with uncover to collect code
coverage data.
% a.out
% cp a.out.save a.out
% a.out
% uncover a.out
-
After the information has been gathered, you can choose to use Code
Analyzer with the GUI or the codean command-line tool to
display the collected data.
-
For accessing Code Analyzer with the GUI, use the following
command:
% code-analyzer a.out
-
For accessing Code Analyzer with the command-line tool, use the
following command:
% codean a.out