|
|
|
@ -98,31 +98,38 @@ namespace ICSharpCode.ILSpyX.PdbProvider
@@ -98,31 +98,38 @@ namespace ICSharpCode.ILSpyX.PdbProvider
|
|
|
|
|
var debugInfo = metadata.GetMethodDebugInformation(method); |
|
|
|
|
var sequencePoints = new List<Decompiler.DebugInfo.SequencePoint>(); |
|
|
|
|
|
|
|
|
|
foreach (var point in debugInfo.GetSequencePoints()) |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
string documentFileName; |
|
|
|
|
|
|
|
|
|
if (!point.Document.IsNil) |
|
|
|
|
{ |
|
|
|
|
var document = metadata.GetDocument(point.Document); |
|
|
|
|
documentFileName = metadata.GetString(document.Name); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
foreach (var point in debugInfo.GetSequencePoints()) |
|
|
|
|
{ |
|
|
|
|
documentFileName = ""; |
|
|
|
|
string documentFileName; |
|
|
|
|
|
|
|
|
|
if (!point.Document.IsNil) |
|
|
|
|
{ |
|
|
|
|
var document = metadata.GetDocument(point.Document); |
|
|
|
|
documentFileName = metadata.GetString(document.Name); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
documentFileName = ""; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sequencePoints.Add(new Decompiler.DebugInfo.SequencePoint() { |
|
|
|
|
Offset = point.Offset, |
|
|
|
|
StartLine = point.StartLine, |
|
|
|
|
StartColumn = point.StartColumn, |
|
|
|
|
EndLine = point.EndLine, |
|
|
|
|
EndColumn = point.EndColumn, |
|
|
|
|
DocumentUrl = documentFileName |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sequencePoints.Add(new Decompiler.DebugInfo.SequencePoint() { |
|
|
|
|
Offset = point.Offset, |
|
|
|
|
StartLine = point.StartLine, |
|
|
|
|
StartColumn = point.StartColumn, |
|
|
|
|
EndLine = point.EndLine, |
|
|
|
|
EndColumn = point.EndColumn, |
|
|
|
|
DocumentUrl = documentFileName |
|
|
|
|
}); |
|
|
|
|
return sequencePoints; |
|
|
|
|
} |
|
|
|
|
catch (BadImageFormatException) |
|
|
|
|
{ |
|
|
|
|
return EmptyList<Decompiler.DebugInfo.SequencePoint>.Instance; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return sequencePoints; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public IList<Variable> GetVariables(MethodDefinitionHandle method) |
|
|
|
|