コード例 #1
0
        public CIContainer Transform()
        {
            try
            {
                iContainer = iDataProvider.CreateContainer(iDescriptor);

                SaveInputData();

                CreateHeader();
                CIProcess process = CreateProcess();
                CreateThread(process);
            }
            catch (Exception e)
            {
#if DEBUG
                System.Diagnostics.Debug.WriteLine("DEXC READER QUEUE EXCEPTION: " + e.Message);
                System.Diagnostics.Debug.WriteLine("DEXC READER QUEUE STACK: " + e.StackTrace);
#endif
                //
                iContainer = iDataProvider.CreateErrorContainer(iDescriptor);
                CIMessageError error = new CIMessageError(iContainer, "Error");
                error.AddLine(e.Message);
                iContainer.Messages.Add(error);
            }
            //
            return(iContainer);
        }
コード例 #2
0
 public CICodeSegList(CIProcess aProcess, IEnumerable <CICodeSeg> aEnumerable)
     : this( aProcess )
 {
     foreach (CICodeSeg cs in aEnumerable)
     {
         AddChild(cs);
     }
 }
コード例 #3
0
 public void GetProcessInfo(CIProcess aProcess)
 {
     if (IsValid)
     {
         aProcess.Name       = Process;
         aProcess.Generation = Generation;
         aProcess.SID        = SID;
     }
 }
コード例 #4
0
        private CIProcess CreateProcess()
        {
            CIProcess process = new CIProcess(iContainer);

            ExtractProcess(process);
            ExtractProcessCodeSegs(process);

            iContainer.AddChild(process);
            return(process);
        }
コード例 #5
0
        private CIThread CreateThread(CIProcess aProcess)
        {
            // Make a new thread
            CIThread thread = aProcess.CreateThread();

            // Extract items
            ExtractThread(thread);
            ExtractThreadExitReason(thread);
            ExtractThreadRegisters(thread);
            ExtractThreadStack(thread);

            iContainer.AddChild(thread);
            return(thread);
        }
コード例 #6
0
        private void ExtractProcess(CIProcess aProcess)
        {
            // Extract process info from thread full name.
            DExcExtractorList threadInfo = iData[DExcExtractorListType.EListThread];

            foreach (string line in threadInfo)
            {
                Match m = EM.ThreadName.Match(line);
                if (m.Success)
                {
                    CIFullNameUtils parser = new CIFullNameUtils(m.Groups[1].Value);
                    parser.GetProcessInfo(aProcess);

                    return;
                }
            }
        }
コード例 #7
0
        private void ExtractProcessCodeSegs(CIProcess aProcess)
        {
            DExcExtractorList codeSegInfo = iData[DExcExtractorListType.EListCodeSegments];

            foreach (string line in codeSegInfo)
            {
                Match m = EM.CodeSegmentsEntry.Match(line);
                if (m.Success)
                {
                    GroupCollection groups = m.Groups;
                    //
                    uint   codeSegBase  = uint.Parse(groups[1].Value, System.Globalization.NumberStyles.HexNumber);
                    uint   codeSegLimit = uint.Parse(groups[2].Value, System.Globalization.NumberStyles.HexNumber);
                    string codeSegName  = groups[3].Value;
                    //
                    aProcess.CreateCodeSeg(codeSegName, codeSegBase, codeSegLimit);
                }
            }
        }
コード例 #8
0
        public CIStackBuilder(CIStack aStack, DbgEngine aDebugEngine)
        {
            iStack       = aStack;
            iStackEngine = new StackEngine(aDebugEngine);
            iStackEngine.AddressInfo.Pointer = aStack.PointerValue;
            iStackEngine.AddressInfo.Range   = aStack.Range;
            iStackEngine.Registers           = aStack.Registers;
            iStackEngine.DataSource          = aStack.RawSourceData;

            // Get the code segments for the process
            bool isThreadStack = aStack.IsThreadAvailable;

            if (isThreadStack)
            {
                CIProcess process = OwningProcess;
                System.Diagnostics.Debug.Assert(process != null);

                // Seed stack engine with relevant code segments
                iStackEngine.CodeSegments = process.CodeSegments;
            }
        }
コード例 #9
0
 public CICodeSegList(CIProcess aProcess)
     : base(aProcess.Container, aProcess)
 {
     base.AddSupportedChildType(typeof(CICodeSeg));
     base.AddSupportedChildType(typeof(CrashItemLib.Crash.Messages.CIMessage));
 }
コード例 #10
0
 public CXmlProcess(CIProcess aProcess)
     : base(SegConstants.Processes_Process)
 {
     iProcess = aProcess;
 }
コード例 #11
0
 public CICodeSeg(CIProcess aProcess, CodeSegDefinition aCodeSegDef)
     : base(aProcess.Container)
 {
     iOwningProcess = aProcess;
     iCodeSegDef    = aCodeSegDef;
 }
コード例 #12
0
 public CICodeSeg(CIProcess aProcess)
     : this(aProcess, new CodeSegDefinition())
 {
 }
コード例 #13
0
 public CIThread(CIProcess aProcess)
     : base(aProcess.Container, aProcess)
 {
     AddChild(new CIExitInfo(this));
     AddChild(new CIThreadRegisterListCollection(this));
 }