2

Does anyone know of tools that can disassemble IL back into C# code and use information stored in a mdb file to annotate the line numbers of the dissassembled IL?

I am trying to investigate stack traces that have line numbers included without having the exact source code that was used to compile. But I got an mdb file.

At the moment, I am using dotPeek and ILSpy to do the disassembling for me, but I don't seem to find any option to specify an mdb.

There is a non-editable section "Pdb" under the properties of DLL in dotPeek 1.4, but I couldn't find a mdb2pdb converter either. (only pdb2mdb included in Mono).

sangram parmar
  • 8,462
  • 2
  • 23
  • 47
Imi
  • 1,579
  • 1
  • 12
  • 22
  • 1
    why does it matter? If you don'T have original source codes, why would you want to preserve symbols in original mdb. you can generate a new pdb and decompiled sources with dotpeek – Serguzest Jul 01 '15 at 08:44
  • I am analyzing stack traces to find bugs in 3rd party libraries. I can't easily recompile the project that I am trying to find the error for. – Imi Jul 01 '15 at 08:47
  • Then again... maybe I could decompile the whole DLL, recompile it, replace and start debugging.. Interesting idea. Except that I am not aware of any disassembler that can correctly generate compiling C# code for lambdas and other anonymous classes.. – Imi Jul 01 '15 at 08:50
  • You don't need to recompile. have you seen this https://confluence.jetbrains.com/display/NETCOM/dotPeek+Symbol+Server+and+PDB+Generation – Serguzest Jul 01 '15 at 08:50
  • Oh, the symbol server thing.. But that mean I have to attach to the running process. I cannot directly attach a debugger. It's a DLL that runs within Unity editor and AFAIK neither MonoDevelop nor VS can attach to the managed part of the editor itself. – Imi Jul 01 '15 at 08:53

0 Answers0