Breakpad:Symbols

Revision as of 18:42, 13 April 2011 by Ted Mielczarek (talk | contribs) (first draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In order for Socorro to produce useful stack traces for crash reports, it needs debug symbols matching the libraries that are loaded in each report. Currently these symbols are all in the Breakpad text symbol format, but there is work in progress (bug 607831, symboltests, minidump-stackwalk, binary-symbols branch) to make them use the new binary format that is implemented in upstream Breakpad.

How Socorro locates symbols

Currently, Socorro uses the stock minidump_stackwalk tool from upstream Breakpad to process minidumps into usable crash reports. minidump_stackwalk uses SimpleSymbolSupplier to locate symbols. SimpleSymbolSupplier simply looks for symbol files in a known directory structure given a list of symbol directories. Each library in a crash report has a "debug filename", which is simply the library filename everywhere except Windows, where it is the PDB filename, and a "debug identifier", which is a GUID+1 extra character that uniquely identifies a compiled version of a library. On Windows this is a GUID+age field that is baked into the binary by the linker. On other platforms this is a hash of certain parts of the file. The SimpleSymbolSupplier looks for symbol files in file paths of the form:

 <debug filename>/<debug identifier>/<debug filename>.sym

for example:

 firefox.pdb/C48C38C9E37E4A689D57C7509EEB017A2/firefox.sym