Browse Source

use proper type for local variables from decompiled code

newNRILSpyDebugger
Siegfried Pammer 12 years ago
parent
commit
b5a7cb9bc6
  1. 18
      src/AddIns/DisplayBindings/ILSpyAddIn/ILSpySymbolSource.cs

18
src/AddIns/DisplayBindings/ILSpyAddIn/ILSpySymbolSource.cs

@ -96,13 +96,17 @@ namespace ICSharpCode.ILSpyAddIn
if (symbols == null) if (symbols == null)
return null; return null;
return symbols.LocalVariables.Select(v => new Debugger.ILLocalVariable() { var context = new SimpleTypeResolveContext(method);
Index = v.OriginalVariable.Index, var loader = new CecilLoader();
Type = method.Compilation.FindType(KnownTypeCode.Object), // TODO
Name = v.Name, return symbols.LocalVariables.Select(
IsCompilerGenerated = false, v => new Debugger.ILLocalVariable() {
ILRanges = new [] { new Debugger.ILRange(0, int.MaxValue) } Index = v.OriginalVariable.Index,
}); Type = loader.ReadTypeReference(v.Type).Resolve(context),
Name = v.Name,
IsCompilerGenerated = false,
ILRanges = new [] { new ILRange(0, int.MaxValue) }
});
} }
} }

Loading…
Cancel
Save