Пример #1
0
        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
        {
            // This node does not trigger generation of other nodes.
            if (relocsOnly)
            {
                return(new ObjectData(Array.Empty <byte>(), Array.Empty <Relocation>(), 1, new ISymbolDefinitionNode[] { this }));
            }

            byte[] typeRecords = _dbgInfo.GetRawBlob().ToArray();
            _dbgInfo = null; // Neuter the section so that it cannot grow any larger
            Neuter();        // Neuter the writer so that nothing else can attempt to add new types

            return(new ObjectData(typeRecords, Array.Empty <Relocation>(), 1, new ISymbolDefinitionNode[] { this }));
        }
Пример #2
0
        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
        {
            // This node does not trigger generation of other nodes.
            if (relocsOnly)
            {
                return(new ObjectData(Array.Empty <byte>(), Array.Empty <Relocation>(), 1, new ISymbolDefinitionNode[] { this }));
            }

            Debug.Assert(_dbgInfoWriter == null); // Type records should all be written and writing shutdown before reaching this point

            byte[] typeRecords = _dbgInfo.GetRawBlob().ToArray();
            _dbgInfo = null; // Neuter the section so that it cannot grow any larger

            return(new ObjectData(typeRecords, Array.Empty <Relocation>(), 1, new ISymbolDefinitionNode[] { this }));
        }
Пример #3
0
 public void Neuter()
 {
     _dbgInfoWriter = null;
 }
Пример #4
0
 public WindowsDebugTypeRecordsSection(DebugInfoWriter dbgInfo, NodeFactory factory)
 {
     _dbgInfoWriter = _dbgInfo = dbgInfo;
     _nodeFactory   = factory;
 }