Code Monkey home page Code Monkey logo

Comments (5)

 avatar commented on July 25, 2024

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.

from dnlib.

 avatar commented on July 25, 2024

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;

from dnlib.

picrap avatar picrap commented on July 25, 2024

I am totally sure that it is broken when modifying Win32 resources and only with this.
However I did not try both PDB writers (dnlib is rich 😄), I'll check this.
I was asking just in case it was ringing a bell and make you answer something like "Oh yes! I know!"; Since this is not the case, I'll do some research by myself and let you know.

from dnlib.

 avatar commented on July 25, 2024

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?

from dnlib.

picrap avatar picrap commented on July 25, 2024

Yes, I write a new one. However, I don't make any change to it (I assume the magic works).

from dnlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.