DefineCompilationUnit() public method

public DefineCompilationUnit ( SourceFileEntry source ) : CompileUnitEntry
source SourceFileEntry
return CompileUnitEntry
        public ISymUnmanagedDocumentWriter DefineDocument(string url, ref Guid language, ref Guid languageVendor, ref Guid documentType)
        {
            SymbolDocumentWriterImpl doc;

            if (!documents.TryGetValue(url, out doc))
            {
                SourceFileEntry  entry     = msw.DefineDocument(url);
                CompileUnitEntry comp_unit = msw.DefineCompilationUnit(entry);
                doc = new SymbolDocumentWriterImpl(comp_unit);
                documents.Add(url, doc);
            }
            return(doc);
        }
        public ISymbolDocumentWriter DefineDocument(
            string url,
            Guid language,
            Guid languageVendor,
            Guid documentType)
        {
            SymbolDocumentWriterImpl doc = (SymbolDocumentWriterImpl)documents [url];

            if (doc == null)
            {
                SourceFileEntry  entry     = msw.DefineDocument(url);
                CompileUnitEntry comp_unit = msw.DefineCompilationUnit(entry);
                doc             = new SymbolDocumentWriterImpl(comp_unit);
                documents [url] = doc;
            }
            return(doc);
        }
示例#3
0
        SourceFile GetSourceFile(MonoSymbolWriter mdb, PdbFunction function)
        {
            var name = (from l in function.lines where l.file != null select l.file.name).First ();

            SourceFile file;
            if (files.TryGetValue (name, out file))
                return file;

            var entry = mdb.DefineDocument (name);
            var unit = mdb.DefineCompilationUnit (entry);

            file = new SourceFile (unit, entry);
            files.Add (name, file);
            return file;
        }
示例#4
0
文件: location.cs 项目: afaerber/mono
		public override void DefineSymbolInfo (MonoSymbolWriter symwriter)
		{
			base.DefineSymbolInfo (symwriter);

			comp_unit = symwriter.DefineCompilationUnit (SourceFileEntry);

			if (include_files != null) {
				foreach (SourceFile include in include_files.Values) {
					include.DefineSymbolInfo (symwriter);
					comp_unit.AddFile (include.SourceFileEntry);
				}
			}
		}
示例#5
0
		//
		// Creates symbol file index in debug symbol file
		//
		void CreateUnitSymbolInfo (MonoSymbolWriter symwriter)
		{
			var si = file.CreateSymbolInfo (symwriter);
			comp_unit = symwriter.DefineCompilationUnit (si);

			if (include_files != null) {
				foreach (SourceFile include in include_files.Values) {
					si = include.CreateSymbolInfo (symwriter);
					comp_unit.AddFile (si);
				}
			}
		}