Why are the binaries compiled for debug much larger using C++ 5.9 and 5.10?
C++ changed debug format from stabs to dwarf format in Sun Studio 12 (C++ 5.9). The change was necessary because stabs format was not capable of representing new debugger information now generated by the compiler. Dwarf format is a bit larger than stabs, partly because it contains additional information the debugger can use. By default, stabs information resides only in the .o files, and the a.out contains only “index stabs” that show where to find the stabs data in the individual .o files. The .o files had to be present and all files had to be in the same location at runtime in order to debug a program. The -xs option for stabs caused all the stabs data to be copied into the a.out. The a.out then became a stand-alone program for debugging. You could debug it anywhere, and the .o files were not referenced. Using dwarf format, the a.out contains all the debug data. The size is only a bit larger than when using stabs with the -xs option. Dwarf format does not allow the debug data to be c