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 })); }
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 })); }
public void Neuter() { _dbgInfoWriter = null; }
public WindowsDebugTypeRecordsSection(DebugInfoWriter dbgInfo, NodeFactory factory) { _dbgInfoWriter = _dbgInfo = dbgInfo; _nodeFactory = factory; }