-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NGEN-generated PDB support #153
Comments
|
DIA uses the section map/OMF segment map (same thing, different names in different sources) to aid the translation. Section headers are not necessary to do the translation and this library simply doesn't implement the address translation this way. |
Ah ha! I just made my way there, but was trying to figure out how to use that data. Sounds like I'm on the right track, at least for a limited use case. |
Hmm, could maybe use another hint here @JustasMasiulis :) In this PDB, there isn't any omap data. So all I've got is the section_map.
if I parse the
If I parse it as a DbiSectionMap from syzygy I get:
DbiSectionMap packs flags/section_type into the 16-bit flags OMFSegMapDesc field, ok. But |
That is correct and this value is used as it is.
For your specific PDB the segment frame is always 1, so there will be no section RVA "synthesis" (which is needed when there are no section headers) beyond adding |
Hm how do I know this? (and apologies, I'm still figuring out all the PDB details, so I'm not 100% familiar what the "segment frame" is -- equivalent to the section here? And thank you for your help!)
All the public symbols do fit within the first section's range, so moot point here, but e.g. where is e.g. I hacked in a version of this in the crate that turns out I'm actually using (so many pdbs) in samply; thanks for your help. |
(Also to be clear, happy to do a PR for this upstream version of the crate as well if there's interest) |
Both the second and third entries refer to frame > 1 and need extra work beyond just adding |
I'm working to improve some profiling tools (
samply
specifically) that uses thepdb
create under the hood. Part of what I need is being able to handle symbols for .NET, specifically symbols from Crossgen2-built Ready 2 Run assemblies. I think that's where things are coming from anyway, anyway -- things that end in .ni.pdb, I think written here with some comments about DiaSymReader and other: https://github.com/dotnet/runtime/blob/fc76b1cac3f02cc9729f6682d6850fd7982e9fe5/src/coreclr/tools/aot/ILCompiler.Diagnostics/PdbWriter.cs#L199Here's an example of this type of PDB, from Microsoft's symbol server: dotnet.ni.dll Also just in case, this isn't a Portable PDB, it's a normal PDB, but I think written in a very limited way. It's just the symbol information.
When read by the
pdb
create, these pdbs show up as having no section information. Which means it can't get an address map, which means that I end up with no way of translating RVA addresses to symbols. Section contribution information is there though, e.g. here'sdia2dump -x
:These section contributions map directly to the 3 sections in the actual code
dotnet.dll
. I have no idea wheredia2dump
is getting theRVA
from above, as it's not in the section contrib information. I do see inPdbWriter.cs
some places where sections are written, but I have no idea where that info is going!In case it's useful, there's one module in this PDB (again from dia2dump):
The text was updated successfully, but these errors were encountered: