[Dwarf-Discuss] RFC: DWARF Extensions for Separate Debug Info Files ("Fission")

Jason Molenda jmolenda@apple.com
Fri Sep 23 21:01:44 GMT 2011

On Sep 23, 2011, at 10:58 AM, Cary Coutant wrote:

>> The compiler puts DWARF in the .o file, the linker adds some records in the executable which help us to understand where files/function/symbols landed in the final executable[1].
> Did you intend to add a footnote?

Yeah, I realized after I sent the email - it didn't seem interesting enough to warrant a separate followup.

The records that our linker puts in the executable are in the form of stabs entries.  There are a handful of stabs records created - file start, file end, function start, function end, symbol, pointer to a .o file, maybe one or two others.  We chose that format because it was trivial to support and we already had tools for stripping these records out of the executable once the dSYM had been created.

Once a dSYM has been created with all of the DWARF collected in a single file, our DWARF is parseable by any debug info consumer with minimal changes -- they need to know to look in a separate file for the DWARF from the main executable, but the format itself is unchanged.  Supporting the debug-information-in-.o-files is more involved, I don't know if any of the third-party debuggers on our platform work with it.

> We're trying to achieve something very similar, but we have the
> additional goal of separating the info from the .o files because of
> our distributed build environment. I also wanted to attempt to
> standardize the approach, instead of having each vendor go in separate
> directions.

Yeah, if your regular build environment involves distributed compilation, and the .o files need to be copied to a central system for the linker, then I can see why you're pursuing this approach.  For us, the most common usage is single-computer compilation & linking -- where the linker never pages in the debug info sections from the .o files so their size is not particular important.


More information about the Dwarf-discuss mailing list