getsentry / pdb

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

address_map return with Err AddressMapNotFound #50

Closed wyxloading closed 5 years ago

wyxloading commented 5 years ago

I am encounter some pdb with no omap info ( also none DBIExtraStreams.section_headers ). When i call pdb.address_map() and Err(AddressMapNotFound) returned. I wonder if this behavior is expected? I am trying to dump the symbol tables, using the address_map to translate (metioned in #17 ) What should i do with pdbs without extra streams or omap infos?

Here is the sample pdb i download from microsoft symbol server. mscorlib.ni.pdb.zip

willglynn commented 5 years ago

Without section headers, the PDB can't translate {section, offsets} to/from RVAs. There's simply no data for a pdb::AddressMap to use.

You could perform such translation yourself using the section headers in the corresponding executable, but pdb doesn't touch executables, so that's out of scope here.

wyxloading commented 5 years ago

thanks for the quick response, i got it.