WriteSymbolFile() public method

public WriteSymbolFile ( System.Guid guid ) : void
guid System.Guid
return void
Beispiel #1
0
        internal static void Convert(AssemblyDefinition assembly, IEnumerable<PdbFunction> functions, MonoSymbolWriter mdb)
        {
            var converter = new Converter (mdb);

            foreach (var function in functions)
                converter.ConvertFunction (function);

            mdb.WriteSymbolFile (assembly.MainModule.Mvid);
        }
        public void Close()
        {
            var metadata = (MetadataBuilder)typeof(MetadataWriter).GetRuntimeFields().First((f) => f.Name == "metadata").GetValue(writer);

            Guid moduleVersionId = Guid.Empty;
            var  guidIndex       = (Dictionary <Guid, GuidHandle>) typeof(MetadataBuilder).GetRuntimeFields().First((f) => f.Name == "_guids").GetValue(metadata);

            foreach (var pair in guidIndex)
            {
                if (pair.Value.GetHashCode() == 1)                   // This is hack because GetHashCode() returns this._index
                {
                    moduleVersionId = pair.Key;
                    break;
                }
            }
            msw.WriteSymbolFile(moduleVersionId);
        }
Beispiel #3
0
        public void Close()
        {
            var heapBuilder = (MetadataHeapsBuilder)typeof(MetadataWriter).GetRuntimeFields().First((f) => f.Name == "heaps").GetValue(writer);

            Guid moduleVersionId = Guid.Empty;
            var  guidIndex       = (Dictionary <Guid, int>) typeof(MetadataHeapsBuilder).GetRuntimeFields().First((f) => f.Name == "_guids").GetValue(heapBuilder);

            foreach (var pair in guidIndex)
            {
                if (pair.Value == 1)
                {
                    moduleVersionId = pair.Key;
                    break;
                }
            }
            msw.WriteSymbolFile(moduleVersionId);
        }
		public void Close()
		{
			MonoSymbolWriter writer = new MonoSymbolWriter(moduleBuilder.FullyQualifiedName);

			foreach (Method method in methods.Values)
			{
				if (method.document != null)
				{
					if (method.document.source == null)
					{
						method.document.source = new SourceFileEntry(writer.SymbolFile, method.document.url);
					}
					ICompileUnit file = new CompileUnitEntry(writer.SymbolFile, method.document.source);
					SourceMethodBuilder smb = writer.OpenMethod(file, 0, method);
					for (int i = 0; i < method.offsets.Length; i++)
					{
						smb.MarkSequencePoint(method.offsets[i], method.document.source, method.lines[i], method.columns[i], false);
					}
					for (int i = 0; i < method.variables.Count; i++)
					{
						writer.DefineLocalVariable(i, method.variables[i]);
					}
					writer.CloseMethod();
				}
			}

			writer.WriteSymbolFile(moduleBuilder.ModuleVersionId);
		}
 public void Close()
 {
     msw.WriteSymbolFile(guid);
 }
Beispiel #6
0
 public void Close()
 {
     msw.WriteSymbolFile(mb.ModuleVersionId);
 }