HP-UX Cadvise Brochure

HP Code Advisor C.02.25 (cadvise)
Feedback: cadvise-help@cup.hp.com More information: www.hp.com/go/cadvise
Path
/opt/cadvise/bin/cadvise
Mode of Operation
cadvise [cadvise-options]user-compile-cmd [compiler-options]
Example Usage
Simple use of cadvise in conjunction with user builds - Only compile time checks are
performed, no cross-file analysis is done.
% cadvise cc -c file1.c
% cadvise cc -c file2.c
Enable use of program database and do cross-file analysis. Use "report" mode of cadvise
to analyze messages.
% cadvise -pdb mypdb cc -c file1.c
% cadvise -pdb mypdb cc -c file2.c
% cadvise -pdb mypdb cc file1.o file2.o
% cadvise report –pdb mypdb
Types of Checks
+wperfadvice[=1|2|3|4]
Enable performance advice.
+wsecurity [=1|2|3|4]
Enable security vulnerability checking.
+wlint
Enable lint style warnings.
+w64bit
Enable 32-bit to 64-bit porting warnings.
+wendian
Enable endianness checks.
+wall
Enable +wlint, +wsecurity, +w64bit and +wendian.
+wlock
Enable lock checks for programs using pthread based lock/unlock calls.
-migration Print only those messages that are related to migration, such
as endian, and 32-bit to 64-bit migration related diagnostics.
The -migration filter can be used along with other filtering
options such as -severity, -diag, -include etc.; only diagnostics
that meet all filtering criteria will be reported.
+metrics[=ict][:out=pdb|<filename>|+<filename>]
Emit program complexity metrics into the PDB or the file filename.
Report Generation
Using single PDB:
cadvise report <report options> -pdb <pdb location>
Using multiple PDBs:
cadvise report <report options> -pdb <pdb1>:<pdb2>:...
cadvise report <report options> -pdb <pdb1>,<pdb2>,...
cadvise report <report options> -pdb <pdb1> -pdb <pdb2> ...
Using log files:
cadvise report <report options> <log_file1> <log_file2>...
<log_fileN>
Options for Report Generation
-severity N
Print diagnostics with severity >= N. Valid values for N are 1 - 9. Highest
severity is 9 (Default value is 5).
-summary
Print summary information about all diagnostics in the log files by
severity level.
-all
Print all diagnostics in the log files sorted by the severity level.
-diag D1, D2, D3...Dn
Report messages with any of the diagnostics numbers D1 to Dn.

Summary of content (3 pages)