+using System;
using System.Text.RegularExpressions;
using System.Globalization;
public readonly uint MethodIndex;
public readonly string Line;
+ public readonly bool IsValid;
+
public string File { get; private set; }
public int LineNumber { get; private set; }
Offset = offset;
IsILOffset = isILOffset;
MethodIndex = methodIndex;
+
+ IsValid = true;
+ }
+
+ private StackFrameData (string line)
+ {
+ LineNumber = -1;
+
+ Line = line;
}
public static bool TryParse (string line, out StackFrameData stackFrame)
stackFrame = null;
var match = regex.Match (line);
- if (!match.Success)
+ if (!match.Success) {
+ if (line.Trim ().StartsWith ("at ", StringComparison.InvariantCulture)) {
+ stackFrame = new StackFrameData (line);
+ return true;
+ }
return false;
+ }
string typeFullName, methodSignature;
var methodStr = match.Groups ["Method"].Value.Trim ();
aotid = aotidMetadata.Value;
var linesMvid = ProcessLinesMVID (metadata);
- var lineNumber = 0;
+ var lineNumber = -1;
foreach (var sfData in stackFrames) {
string mvid = null;
+ lineNumber++;
+ if (!sfData.IsValid)
+ continue;
if (linesMvid.ContainsKey (lineNumber))
- mvid = linesMvid [lineNumber++];
+ mvid = linesMvid [lineNumber];
symbolManager.TryResolveLocation (sfData, mvid, aotid);