Specifications

Red Hat Enterprise Linux to Oracle Solaris Porting Guide
31
Discover is a tool used by software developers to detect programming errors related to the
allocation and use of program memory at runtime.
It can detect the following types of programming errors:
Reading from and writing to unallocated memory
Freeing the wrong memory blocks
Using freed memory
Accessing memory beyond allocated array bounds
Memory leaks
Accessing uninitialized memory
Uncover is a command-line tool for measuring the code coverage of user applications. This tool can
display information on the areas of an application that are exercised during testing. The coverage
information reported by this tool could be at the level of a function, statement, basic block, or
instruction. With Oracle Solaris 11, there is no longer a need to buy expensive commercial
third-party memory usage and leak analyzers. By default, the high-performance libumem library is
bundled with Oracle Solaris 11. The libumem library, along with debugging tool dbx, finds
difficult-to-detect memory leaks and buffer overruns.
GNU Compiler Collection (GCC) Versus Oracle Solaris Studio Compiler Option
Mapping
By default, RHEL 6 comes with GCC v 4.4.5, while on Oracle Solaris 11, the certified IPS package for
GCC v 4.5.2 is available for installation. For various reasons discussed earlier, it is strongly recommend
that Oracle Solaris Studio be used for all development work on both platforms.
To help with this compiler transition, Table 4-1 provides the mapping of various GCC options with
Oracle Solaris Studio compiler options. Also see Appendix B, which provides a list of all GCC options
that exactly match the options in Oracle Solaris Studio 12.3. The list in Appendix B includes compiler
options available in Oracle Solaris Studio 12.3 that are not shown in Table 4-1.
TABLE 4-1. EQUIVALENT COMPILER FLAGS AND WORKAROUNDS
GCC 4.4.5 OPTIONS ORACLE SOLARIS STUDIO 12.3
OPTIONS
DESCRIPTION
-### -xdryrun
or
-###
Shows each component as it would be invoked, but does not
actually execute it. Also shows how command options would
expand.
-aux-info filename -xP Prints prototypes for K&R function definitions.
-Bprefix
GCC_EXEC_PREFIX
-YA, dir
-Yc, dir
-YA changes the default directory that is searched for the
compiler components.