public ThreadStackInfo(CrashDebuggerInfo aCrashDebugger, DThread aThread, TType aType) : base(aCrashDebugger) { iType = aType; iThread = aThread; iData = new ThreadStackData(aCrashDebugger, this); }
private void PrimeStackEngine() { // Create new engine (resets old data) iStackEngine = new StackEngine(iInfo.CrashDebugger.DebugEngine); // Not yet ready iIsReady = false; // Get the data source DThread thread = iInfo.Info.Thread; string threadName = thread.Name.ToLower(); // DataBuffer dataSource = iInfo.Data; if (dataSource.Count > 0) { // Prime stack engine with data & current stack pointer iStackEngine.Primer.Prime(dataSource); iStackEngine.AddressInfo.Pointer = iInfo.Info.StackPointer; // Set us up so we know when the process finishes iStackEngine.EventHandler += new StackEngine.StackEngineEventHandler(StackEngine_EventHandler); // Set up registers. First update them taking into account the // curent CPU regs. RegisterCollection.TType requiredType = RegisterCollection.TType.ETypeUser; if (iInfo.Info.Type == ThreadStackInfo.TType.ETypeSupervisor) { requiredType = RegisterCollection.TType.ETypeSupervisor; } RegisterCollection registers = thread.NThread.GetRegisters(requiredType); iStackEngine.Registers = registers; // Get code segs DProcess process = thread.OwningProcess; if (process != null) { iStackEngine.CodeSegments = process.GetCodeSegDefinitions(); } } else { } }