public override MemOpBase Parse(ref string aLine, MemAnalysisParserPrefixesBase aPrefixes) { MemOpFree ret = new MemOpFree(); // Parse fields base.ParseCommonUser(ret, ref aLine, aPrefixes); // Set type ret.Function = this; return(ret); }
public override MemOpBase Parse(ref string aLine, MemAnalysisParserPrefixesBase aPrefixes) { MemOpAllocation ret = new MemOpAllocation(); // Parse fields base.ParseCommonKernel(ret, ref aLine, aPrefixes); ParseCommonAlloc(ret, ref aLine, aPrefixes); // Set type ret.Function = this; return(ret); }
protected void ParseCommonKernel(MemOpBase aOperation, ref string aLine, MemAnalysisParserPrefixesBase aPrefixes) { string line = aLine; // if (line.IndexOf(aPrefixes.CellAddress) >= 0) { PrefixParser.SkipPrefix(aPrefixes.CellAddress, ref line); aOperation.CellAddress = PrefixParser.ReadUint(ref line); } if (line.IndexOf(aPrefixes.HeapSize) >= 0) { PrefixParser.SkipPrefix(aPrefixes.HeapSize, ref line); aOperation.HeapSize = PrefixParser.ReadUint(ref line); } if (line.IndexOf(aPrefixes.ChunkSize) >= 0) { PrefixParser.SkipPrefix(aPrefixes.ChunkSize, ref line); aOperation.ChunkSize = PrefixParser.ReadUint(ref line); } if (line.IndexOf(aPrefixes.LinkRegister) >= 0) { PrefixParser.SkipPrefix(aPrefixes.LinkRegister, ref line); aOperation.LinkRegisterAddress = PrefixParser.ReadUint(ref line); } if (line.IndexOf(aPrefixes.CellSize) >= 0) { PrefixParser.SkipPrefix(aPrefixes.CellSize, ref line); aOperation.CellSize = PrefixParser.ReadUint(ref line); } if (line.IndexOf(aPrefixes.AllocNumber) >= 0) { PrefixParser.SkipPrefix(aPrefixes.AllocNumber, ref line); try { aOperation.AllocationNumber = PrefixParser.ReadUint(ref line); } catch (Exception) { } } if (line.IndexOf(aPrefixes.VTable) >= 0) { PrefixParser.SkipPrefix(aPrefixes.VTable, ref line); aOperation.VTable = PrefixParser.ReadUint(ref line); } }
protected void ParseCommonAlloc(MemOpAllocation aOperation, ref string aLine, MemAnalysisParserPrefixesBase aPrefixes) { if (aLine.IndexOf(aPrefixes.AllocSize) >= 0) { PrefixParser.SkipPrefix(aPrefixes.AllocSize, ref aLine); aOperation.AllocationSize = PrefixParser.ReadUint(ref aLine); } }
protected void ParseCommonRealloc(MemOpReallocation aOperation, ref string aLine, MemAnalysisParserPrefixesBase aPrefixes) { if (aLine.IndexOf(aPrefixes.ReallocMode) >= 0) { PrefixParser.SkipPrefix(aPrefixes.ReallocMode, ref aLine); aOperation.ReallocationMode = (byte)PrefixParser.ReadLong(ref aLine); } if (aLine.IndexOf(aPrefixes.OriginalCellAddress) >= 0) { PrefixParser.SkipPrefix(aPrefixes.OriginalCellAddress, ref aLine); aOperation.OriginalAddress = PrefixParser.ReadUint(ref aLine); } if (aLine.IndexOf(aPrefixes.OriginalCellSize) >= 0) { PrefixParser.SkipPrefix(aPrefixes.OriginalCellSize, ref aLine); aOperation.OriginalAllocationSize = PrefixParser.ReadUint(ref aLine); } if (aLine.IndexOf(aPrefixes.OriginalCellAllocNumber) >= 0) { PrefixParser.SkipPrefix(aPrefixes.OriginalCellAllocNumber, ref aLine); aOperation.OriginalAllocationNumber = PrefixParser.ReadUint(ref aLine); } }
public MemAnalysisParserOptions(MemAnalysisParserPrefixesBase aPrefixes) { iPrefixes = aPrefixes; }
public abstract MemOpBase Parse(ref string aLine, MemAnalysisParserPrefixesBase aPrefixes);