From: Igor Kulaychuk Date: Thu, 5 Apr 2018 15:57:44 +0000 (+0300) Subject: Always report nearest sequence point to fix ExceptionTest X-Git-Tag: submit/tizen/20180620.071641~10^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=068dcaeb2994b01885521334d88ffb15128c5d07;p=sdk%2Ftools%2Fnetcoredbg.git Always report nearest sequence point to fix ExceptionTest --- diff --git a/src/debug/netcoredbg/SymbolReader.cs b/src/debug/netcoredbg/SymbolReader.cs index 616859e..e0b6c0b 100644 --- a/src/debug/netcoredbg/SymbolReader.cs +++ b/src/debug/netcoredbg/SymbolReader.cs @@ -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 { diff --git a/src/debug/netcoredbg/modules.cpp b/src/debug/netcoredbg/modules.cpp index 4cb7e70..d8ac1e1 100644 --- a/src/debug/netcoredbg/modules.cpp +++ b/src/debug/netcoredbg/modules.cpp @@ -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)