-
Notifications
You must be signed in to change notification settings - Fork 130
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
Read/write support PDB files #59
Comments
Related #91 |
FormatsThere seems to be multiple PDB formats in use.
PDB 7Uses MSF format and seems to be used the most by compilers such as VC++ and CLang/LLVM. This will require a lot of new models to be added to AsmResolver and probably is worth a separate package (perhaps called Official spec seems to be very lacking. Microsoft only "published" parts of the definitions. LLVM has some docs on it as well which seem more useful than Microsoft's. Wikipedia's docs are also very sparse (https://en.wikipedia.org/wiki/Program_database). We might be able to look for reference implementations such as pdbparse. PDB 2Very little information seems to be available about this format. [Wikipedia] (https://en.wikipedia.org/wiki/Program_database) mentions the existence of it and some details but not a lot. It seems to be that it resembles some of PDB v7 though, but will need samples for this. pdbparse implements this format as well. Portable PDB formatThis seems to be emitted by the Roslyn compilers from the new .NET SDK, and closely resembles the .NET's metadata directory, but with the extension of a Portable CILDBPartition V of ECMA-335 specifies another format called CILDB. This documentation is good but I am not sure which compilers emit these types of files as I have not seen any sample with a PDB file like this. Design choicesGiven the complexity of these formats, it might be best to introduce new packages that can handle these types of files. A couple big important design choices need to be made fairly quick however. These are mainly related to where the implementations of these formats live. For portable PDBs, given that it is really just an extension to the already existing .NET metadata file format, it probably would make sense if we added the raw metadata table row structs to the We could introduce a separate package called Another idea is to introduce multiple PDB related packages instead. It could perhaps look like:
There might also be the possibility to merge the PDB2 and PDB7 versions into one single package as these formats seem to resemble each other somewhat. The great benefit of this approach is that it follows more the modular design style of AsmResolver in general, as |
Any news regarding implementation of that? |
Unfortunately, no concrete implementations yet. As it is right now, other features and bug reports have gained precedence over completely new features such as PDB file support. If there is a demand for PDB support however, I may bring this feature up the backlog. |
I would be interested in helping with this. My interest lies mostly in the PDB 7 format and a little in the Portable PDB format. Even though it increases the package count, I am in favor of your suggestion to do 4 or 5 packages for this. It seems cleaner and most software publishes as a single file. |
@ds5678, Thanks for taking interest. Next to the package design, a couple additional big questions still need to be answered as well, which will also probably answer indirectly which new packages we will finally end up with. Some thoughts below: This feature will probably require quite a bit of prep-work before actual actual coding and integration can take place. One big aspect we need to figure out is whether it is possible to find some kind of unifying API design that abstracts at least some parts of every format into a higher dimension. At least for read-support this would be preferable, as this would simplify usage of the packages a lot. However, too much simplification can also lead to certain features of some formats be forgotten / hidden, which we need to be careful about. One thing I can predict already is that writers are most likely going to have to define their own contracts for their respective formats within their respective packages. I don't think we can (or want to) find a unifying API for this given the vast amount of differences between these formats. Pdb7 and PortablePdb are the ones used the most nowadays it seems, this is definitely where we should put focus on first. Another question is how (if at all) these packages should be integrated somehow in |
No description provided.
The text was updated successfully, but these errors were encountered: