getsentry / pdb

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

Return an Address map if section headers are missing #62

Closed jan-auer closed 4 years ago

jan-auer commented 4 years ago

Some PDBs seem to have no section headers, like for instance .NET Portable PDBs. In this case, pdb.address_map() used to return Error::AddressMapNotFound. It's slightly more ergonomic to return an empty address map for such a case, so that it can be used in offset.to_rva(&address_map) and the likes.

The case where omap_from_src and omap_to_src are missing is still returned as error, though.