getsentry / pdb

A parser for Microsoft PDB (Program Database) debugging information
https://docs.rs/pdb/
Apache License 2.0
367 stars 68 forks source link

Synthesize sections from section map (fixes #153) #154

Open vvuk opened 1 month ago

vvuk commented 1 month ago

This adds support for synthesizing section info from the section map/OMF segment map if there are no section headers in the pdb file. These PDB files are generated from the .NET "crossgen2" tool for precompiled .NET code. This PR is sufficient for tools like pdb-addr2line to read symbols from those files (typically always ending in ".ni.pdb"). There may be more that could be inferred from the section map info, but I tried to be fairly conservative here.