Browse Source

Fixed Forum-8847(asl): Breakpoints can be set within whole method

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1539 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 19 years ago
parent
commit
1d1c4f2053
  1. 11
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs

11
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs

@ -207,15 +207,18 @@ namespace Debugger @@ -207,15 +207,18 @@ namespace Debugger
ISymUnmanagedMethod symMethod;
try {
symMethod = symReader.GetMethodFromDocumentPosition(symDoc, (uint)StartLine, (uint)StartColumn);
symMethod = symReader.GetMethodFromDocumentPosition(symDoc, validLine, 0);
} catch {
return false; //Not found
}
function = module.CorModule.GetFunctionFromToken(symMethod.Token);
ilOffset = (int)symMethod.GetOffset(symDoc, validLine, (uint)StartColumn);
// Check that StartLine is within the method
uint start = symMethod.SequencePoints[0].Line;
uint end = symMethod.SequencePoints[symMethod.SequencePointCount - 1].EndLine;
if (StartLine < start || StartLine > end) return false;
function = module.CorModule.GetFunctionFromToken(symMethod.Token);
ilOffset = (int)symMethod.GetOffset(symDoc, validLine, 0);
return true;
}
}

Loading…
Cancel
Save