On Fri, Jan 26, 2007 at 10:10:55PM -0800, DEEPAK BHATIA wrote:

> When we run the command bldenv -d ./opensolaris to build a
> particular folder, we see that -g option is taken by cc _gcc
> compiler. But when we do elfdump of the executable/relocatable
> object files, we don't see, the debug information.  We have added
> __GNUC="" in opensolaris.sh.

The -g flag is there (along with a few other debugging related flags)
so that gcc will generate debug data of use to ctfconvert.  DWARF and
stabs debugging data are not found in the binaries after the build
process is complete, but kernel modules and libraries (and some
programs) will contain a .SUNW_ctf section that can be viewed with,
i.e. /opt/onbld/bin/ctfdump.  This is an OpenSolaris-specific
debugging format that contains type information but omits, i.e., debug
frame data, and is used by mdb, DTrace and other consumers.

You could suppress the conversion of DWARF2 to CTF in the subdirectory
of interest by overriding the value of CTFCONVERT and related macros.
Note that building kernel modules without CTF will impair mdb and
DTrace functionality.

Since you didn't say which subdirectory you're building, it's not
possible to be more specific.  Defects in particular makefiles are
another possible cause; it's conceivable that the binaries you're
looking at are being stripped or otherwise damaged or improperly
constructed and that neither DWARF nor CTF data will be present.  In
any case, check the makefiles to better understand what's happening.

-- 
Keith M Wesolowski              "Sir, we're surrounded!" 
FishWorks                       "Excellent; we can attack in any direction!" 
_______________________________________________
opensolaris-help mailing list
[email protected]

Reply via email to