Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are the binaries compiled for debug much larger using C++ 5.9 and 5.10?

binaries compiled debug larger
0
Posted

Why are the binaries compiled for debug much larger using C++ 5.9 and 5.10?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.