Browse Source

add ToArray() method to single instruction.

pull/191/merge
Eusebiu Marcu 15 years ago
parent
commit
e11e9c2606
  1. 6
      Debugger/ILSpy.Debugger/Services/Debugger/WindowsDebugger.cs
  2. 9
      ICSharpCode.Decompiler/CodeMappings.cs

6
Debugger/ILSpy.Debugger/Services/Debugger/WindowsDebugger.cs

@ -282,7 +282,7 @@ namespace ILSpy.Debugger.Services @@ -282,7 +282,7 @@ namespace ILSpy.Debugger.Services
// Stepping:
MethodMapping GetNextCodeMapping()
SourceCodeMapping GetNextCodeMapping()
{
uint token;
var instruction = CodeMappingsStorage.GetInstructionByTypeAndLine(
@ -291,9 +291,9 @@ namespace ILSpy.Debugger.Services @@ -291,9 +291,9 @@ namespace ILSpy.Debugger.Services
var val = CodeMappingsStorage[CurrentLineBookmark.Instance.TypeName];
return val.Find(m => m.MetadataToken == token);
var mapping = val.Find(m => m.MetadataToken == token);
//return mapping.MethodCodeMappings.FirstOrDefault(s => s.ILInstructionOffset.From <= instruction.ILInstructionOffset.To);
return mapping.MethodCodeMappings.FirstOrDefault(s => s.ILInstructionOffset.From <= instruction.ILInstructionOffset.To);
}
public void StepInto()

9
ICSharpCode.Decompiler/CodeMappings.cs

@ -25,6 +25,15 @@ namespace ICSharpCode.Decompiler @@ -25,6 +25,15 @@ namespace ICSharpCode.Decompiler
public int SourceCodeLine { get; set; }
public ILRange ILInstructionOffset { get; set; }
public int[] ToArray()
{
int[] result = new int[2];
result[0] = ILInstructionOffset.From;
result[1] = ILInstructionOffset.To;
return result;
}
}
/// <summary>

Loading…
Cancel
Save