Go to main content
Oracle® Developer Studio 12.6: Code Analyzer User's Guide

Exit Print View

Updated: June 2017

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

  1. 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.
  2. Recompile program with debug information.
    % cc -g *.c
  3. 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
  4. Instrument program with uncover and run program to collect code coverage data.
    % cp a.out.save a.out
    % uncover a.out
    % a.out
    % uncover -a a.out.uc
  5. 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