src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Write the PDB file to disk.
/// </summary>
Write the PDB file to disk.
Write the PDB file to disk .
public void WritePDBFile() {
            SymbolWriter symWriter = new SymbolWriter(PEFilename, PDBFilename);
            foreach (Document doc in _docWriters) {
                doc._docWriter = symWriter.DefineDocument(
                    doc._file,
                    doc._docLanguage,
                    doc._langVendor,
                    doc._docType
                );
            }
            if (entryPoint.GetToken() != 0)
                symWriter.SetUserEntryPoint(entryPoint.GetToken());
            foreach (Method meth in methods) {
                symWriter.OpenMethod(meth.Token.GetToken());
                if (meth.Scope != null) WriteScopeAndLocals(symWriter, meth.Scope);
                foreach (Document sourceDoc in meth.SequencePointList.Keys) {
                    SequencePointList spList = (SequencePointList)meth.SequencePointList[sourceDoc];
                    symWriter.DefineSequencePoints(sourceDoc._docWriter,
                        (uint[])spList.offsets.ToArray(typeof(uint)),
                        (uint[])spList.lines.ToArray(typeof(uint)),
                        (uint[])spList.cols.ToArray(typeof(uint)),
                        (uint[])spList.endLines.ToArray(typeof(uint)),
                        (uint[])spList.endCols.ToArray(typeof(uint)));
                }
                symWriter.CloseMethod();
            }
            debugInfo = symWriter.GetDebugInfo();
            symWriter.Close();
        }
public void WritePDBFile ( ) { SymbolWriter symWriter = new SymbolWriter ( PEFilename , PDBFilename ) ; foreach ( Document doc in _docWriters ) { doc . _docWriter = symWriter . DefineDocument ( doc . _file , doc . _docLanguage , doc . _langVendor , doc . _docType ) ; } if ( entryPoint . GetToken ( ) != 0 ) symWriter . SetUserEntryPoint ( entryPoint . GetToken ( ) ) ; foreach ( Method meth in methods ) { symWriter . OpenMethod ( meth . Token . GetToken ( ) ) ; if ( meth . Scope != null ) WriteScopeAndLocals ( symWriter , meth . Scope ) ; foreach ( Document sourceDoc in meth . SequencePointList . Keys ) { SequencePointList spList = ( SequencePointList ) meth . SequencePointList [ sourceDoc ] ; symWriter . DefineSequencePoints ( sourceDoc . _docWriter , ( uint [ ] ) spList . offsets . ToArray ( typeof ( uint ) ) , ( uint [ ] ) spList . lines . ToArray ( typeof ( uint ) ) , ( uint [ ] ) spList . cols . ToArray ( typeof ( uint ) ) , ( uint [ ] ) spList . endLines . ToArray ( typeof ( uint ) ) , ( uint [ ] ) spList . endCols . ToArray ( typeof ( uint ) ) ) ; } symWriter . CloseMethod ( ) ; } debugInfo = symWriter . GetDebugInfo ( ) ; symWriter . Close ( ) ; }
Write the PDB file to disk.
Write the PDB file to disk .
// Create the new Symbol Writer // Add each of the source documents // Set the entry point if it exists // Loop through and add each method // Write the scope and the locals // Add each of the sequence points // Get the debug info // Close the PDB file