[mono-symbolicate] Fixes type with namespace not found
authorMarcos Henrich <marcos.henrich@xamarin.com>
Mon, 18 Jul 2016 13:54:55 +0000 (14:54 +0100)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Mon, 18 Jul 2016 16:04:19 +0000 (17:04 +0100)
mcs/tools/mono-symbolicate/LocationProvider.cs

index 9bcf17b965aab1a0b1fa0e26895a3848140ba9e3..c3a97993c6a75da170fc7363ef3d888cdbd834f2 100644 (file)
@@ -35,6 +35,13 @@ namespace Mono
                        var nested = sfData.TypeFullName.Split ('+');
                        var types = assembly.MainModule.Types;
                        foreach (var ntype in nested) {
+                               if (type == null) {
+                                       // Use namespace first time.
+                                       type = types.FirstOrDefault (t => t.FullName == ntype);
+                               } else {
+                                       type = types.FirstOrDefault (t => t.Name == ntype);
+                               }
+
                                if (type == null) {
                                        logger.LogWarning ("Could not find type: {0}", ntype);
                                        return false;