Hey, On 5/9/09, Timwi <[email protected]> wrote: > Thanks for your reply, but I've tried this and this doesn't appear to > be true. .NET Reflector can read the variable names even if I delete > the .pdb file for the relevant assembly. Therefore, the information > must be in the assembly itself. But even so, suppose I wanted to try > your method...
You're wrong. What Jonathon says is true. The names of the local variables are *only* stored in the debug symbols, which are pdb files on .net, and mdb file on Mono. You need to either get Mono.Cecil.Pdb from /cecil/pdb in Mono' svn. Mono.Cecil.Mdb is in /mcs/class/Mono.Cecil.Mdb, and of course, Mono.Cecil is in /mcs/class/Mono.Cecil. Once you have the appropriate assemblies compiled and put along with Mono.Cecil.dll, you just have to call ModuleDefinition.LoadSymbols just after a GetAssembly call. Et voila, varible names will be retrieved from the symbol file. -- Jb Evain <[email protected]> --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
