diff --git a/Debugger/ILSpy.Debugger/Services/Debugger/WindowsDebugger.cs b/Debugger/ILSpy.Debugger/Services/Debugger/WindowsDebugger.cs index afaf323c6..b81b21abe 100644 --- a/Debugger/ILSpy.Debugger/Services/Debugger/WindowsDebugger.cs +++ b/Debugger/ILSpy.Debugger/Services/Debugger/WindowsDebugger.cs @@ -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 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() diff --git a/ICSharpCode.Decompiler/CodeMappings.cs b/ICSharpCode.Decompiler/CodeMappings.cs index 8c41b5951..4fbb05da9 100644 --- a/ICSharpCode.Decompiler/CodeMappings.cs +++ b/ICSharpCode.Decompiler/CodeMappings.cs @@ -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; + } } ///