[mono-symbolicate] Fixes symbolication of AOTed
authorMarcos Henrich <marcos.henrich@xamarin.com>
Tue, 21 Jun 2016 10:26:57 +0000 (11:26 +0100)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Fri, 8 Jul 2016 21:40:38 +0000 (22:40 +0100)
Sequence points are only required if native offsets are on the
stacktrace.

fix -- seq point info aot

mcs/tools/mono-symbolicate/LocationProvider.cs
mcs/tools/mono-symbolicate/SymbolManager.cs

index 5c41d5f98cd98c6486344b40d5187e5966cc92a5..3e9d8837138e8cb8d1930f9f53f8b58e32f00333 100644 (file)
@@ -47,7 +47,16 @@ namespace Mono
                        if (method == null)
                                return false;
 
-                       int ilOffset = sfData.IsILOffset ? sfData.Offset : seqPointInfo.GetILOffset (method.MetadataToken.ToInt32 (), sfData.MethodIndex, sfData.Offset);
+                       int ilOffset;
+                       if (sfData.IsILOffset) {
+                               ilOffset = sfData.Offset;
+                       } else {
+                               if (seqPointInfo == null)
+                                       return false;
+
+                               ilOffset = seqPointInfo.GetILOffset (method.MetadataToken.ToInt32 (), sfData.MethodIndex, sfData.Offset);
+                       }
+
                        if (ilOffset < 0)
                                return false;
 
index 1d35a5ee3a0b45638e03ffb6706147d0eb0eb756..c2321f523ac48afd0ae618b1c98b1ff9d80b60b6 100644 (file)
@@ -22,7 +22,7 @@ namespace Mono
                        var assemblyLocProvider = GetOrCreateAssemblyLocationProvider (mvid);
 
                        SeqPointInfo seqPointInfo = null;
-                       if (aotid != null)
+                       if (!sfData.IsILOffset && aotid != null)
                                seqPointInfo = GetOrCreateSeqPointInfo (aotid);
 
                        return assemblyLocProvider.TryResolveLocation (sfData, seqPointInfo);