Oracle® Solaris Studio 12.4: Code Analyzer User's Guide

Exit Print View

Updated: October 2014
 
 

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 Solaris Studio 12.4 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 to collect code coverage data.
    % a.out
    % cp a.out.save a.out
    % a.out
    % uncover a.out
  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