Always report nearest sequence point to fix ExceptionTest
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Thu, 5 Apr 2018 15:57:44 +0000 (18:57 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Thu, 5 Apr 2018 15:57:44 +0000 (18:57 +0300)
src/debug/netcoredbg/SymbolReader.cs
src/debug/netcoredbg/modules.cpp

index 616859e1e6afc991c58be35f78e12933b45ed1c7..e0b6c0bcca884763ec2b98b63b5b19f80550861a 100644 (file)
@@ -334,11 +334,12 @@ namespace SOS
                         if (nearestPoint.StartLine == 0 || nearestPoint.StartLine == SequencePoint.HiddenLine)
                             return false;
 
-                        lineNumber = nearestPoint.StartLine;
-                        fileName = reader.GetString(reader.GetDocument(nearestPoint.Document).Name);
-                        return true;
+                        break;
                     }
                 }
+                lineNumber = nearestPoint.StartLine;
+                fileName = reader.GetString(reader.GetDocument(nearestPoint.Document).Name);
+                return true;
             }
             catch
             {
index 4cb7e700a6935d40f1a70ba4ce3cfebef57aa19a..d8ac1e117cd9939dacc04ed1b52a6883e4f23010 100644 (file)
@@ -159,16 +159,16 @@ HRESULT Modules::GetFrameILAndSequencePoint(
         if (p.offset == ilOffset)
             nearestPoint = p;
 
-        sequencePoint.startLine = nearestPoint.startLine;
-        sequencePoint.endLine = nearestPoint.endLine;
-        sequencePoint.startColumn = nearestPoint.startColumn;
-        sequencePoint.endColumn = nearestPoint.endColumn;
-        sequencePoint.offset = nearestPoint.offset;
-        sequencePoint.document = to_utf8(name);
-        return S_OK;
+        break;
     }
 
-    return E_FAIL;
+    sequencePoint.startLine = nearestPoint.startLine;
+    sequencePoint.endLine = nearestPoint.endLine;
+    sequencePoint.startColumn = nearestPoint.startColumn;
+    sequencePoint.endColumn = nearestPoint.endColumn;
+    sequencePoint.offset = nearestPoint.offset;
+    sequencePoint.document = to_utf8(name);
+    return S_OK;
 }
 
 HRESULT Modules::GetStepRangeFromCurrentIP(ICorDebugThread *pThread, COR_DEBUG_STEP_RANGE *range)