Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
        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);
            }
        }
        private bool CheckForKnownElement(ref string aLine, string[] aPrefixes)
        {
            bool handled = false;

            //
            foreach (string prefix in aPrefixes)
            {
                if (aLine.Contains(prefix))
                {
                    PrefixParser.SkipPrefix(prefix, ref aLine);
                    handled = true;
                    break;
                }
            }
            //
            return(handled);
        }
Esempio n. 4
0
 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);
     }
 }