-
Notifications
You must be signed in to change notification settings - Fork 579
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
Win32 resources & PDB #53
Comments
Cecil uses an old open sourced PDB reader written by Microsoft, but I don't think it was written by MS' PDB experts, my guess is it was written by an intern. You can debug it and see where it fails. If there are bugs in it, it's not something I'll fix. Do you have code to reproduce this? Are you sure this only happens if you modify the Win32 resources? AFAICR, the PDB reader doesn't use anything from the Win32 resources. You can use dnlib to loop over every type and method and print the name of the locals and sequence points (stored in instructions) and compare the output before your update and after it. dnlib has two PDB readers, one using Diagnostics Symbol Store (MS' COM PDB reader) and another managed reader written by Ki. Try both and see if they produce the same result. |
I should mention that I assume you let dnlib write a new PDB file after you modified the Win32 resources. If you didn't that's the first thing you should try. :) var opts = new ModuleCreationOptions(ModuleDef.CreateModuleContext());
opts.PdbImplementation = comPdb ? PdbImplType.MicrosoftCOM : PdbImplType.Managed;
opts.TryToLoadPdbFromDisk = true; |
I am totally sure that it is broken when modifying Win32 resources and only with this. |
There's only one PDB writer, but two readers because the original COM reader has limitations (can only be used in the created thread) so Ki wrote a managed reader that can be used in any thread. When you modify the Win32 resources, do you also write a new PDB file? |
Yes, I write a new one. However, I don't make any change to it (I assume the magic works). |
Hi,
It seems that modifying the Win32 resources of an assembly corrupts the PDB.
I have an utility that updates the version number after build, including in the Win32 resources blocks, and after this, some other tools using Cecil do not want to load the .PDB file anymore. Also, some methods do not show their local variables anymore in the debugger.
Since I have absolutely no knowledge at all of .PDB format, I am not very useful to fix the problem.
The text was updated successfully, but these errors were encountered: