|
|
@ -6,6 +6,7 @@ using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
|
using ICSharpCode.Core; |
|
|
|
using ICSharpCode.Core; |
|
|
|
using ICSharpCode.Decompiler; |
|
|
|
using ICSharpCode.Decompiler; |
|
|
|
|
|
|
|
using ICSharpCode.Decompiler.ILAst; |
|
|
|
using ICSharpCode.NRefactory.CSharp; |
|
|
|
using ICSharpCode.NRefactory.CSharp; |
|
|
|
using Mono.Cecil; |
|
|
|
using Mono.Cecil; |
|
|
|
|
|
|
|
|
|
|
@ -41,10 +42,23 @@ namespace ICSharpCode.ILSpyAddIn |
|
|
|
if (node is EntityDeclaration && node.Annotation<MemberReference>() != null) { |
|
|
|
if (node is EntityDeclaration && node.Annotation<MemberReference>() != null) { |
|
|
|
MemberLocations[XmlDocKeyProvider.GetKey(node.Annotation<MemberReference>())] = node.StartLocation; |
|
|
|
MemberLocations[XmlDocKeyProvider.GetKey(node.Annotation<MemberReference>())] = node.StartLocation; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// code mappings
|
|
|
|
|
|
|
|
var ranges = node.Annotation<List<ILRange>>(); |
|
|
|
|
|
|
|
if (symbolsStack.Count > 0 && ranges != null && ranges.Count > 0) { |
|
|
|
|
|
|
|
symbolsStack.Peek().SequencePoints.Add( |
|
|
|
|
|
|
|
new SequencePoint() { |
|
|
|
|
|
|
|
ILRanges = ILRange.OrderAndJoin(ranges).ToArray(), |
|
|
|
|
|
|
|
StartLocation = node.StartLocation, |
|
|
|
|
|
|
|
EndLocation = node.EndLocation |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (node.Annotation<MethodDebugSymbols>() != null) { |
|
|
|
if (node.Annotation<MethodDebugSymbols>() != null) { |
|
|
|
var symbols = symbolsStack.Pop(); |
|
|
|
var symbols = symbolsStack.Pop(); |
|
|
|
symbols.SequencePoints = symbols.SequencePoints.OrderBy(s => s.ILOffset).ToList(); |
|
|
|
symbols.SequencePoints = symbols.SequencePoints.OrderBy(s => s.ILOffset).ToList(); |
|
|
|
symbols.StartLocation = node.StartLocation; |
|
|
|
symbols.StartLocation = node.StartLocation; |
|
|
|
|
|
|
|
symbols.EndLocation = node.EndLocation; |
|
|
|
DebugSymbols[XmlDocKeyProvider.GetKey(symbols.CecilMethod)] = symbols; |
|
|
|
DebugSymbols[XmlDocKeyProvider.GetKey(symbols.CecilMethod)] = symbols; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|