private void EnsureCodeSegmentExistsForSymbol(CIElementFinalizationParameters aParams, CISymbol aSymbol) { if (!aSymbol.IsNull) { Symbol symbol = aSymbol; SymbolCollection collection = symbol.Collection; // string binaryInDevice = PlatformFileNameConstants.Device.KPathWildcardSysBin; binaryInDevice += Path.GetFileName(collection.FileName.EitherFullNameButDevicePreferred); // CICodeSegList codeSegs = CodeSegments; bool alreadyExists = codeSegs.Contains(binaryInDevice); if (!alreadyExists) { // Assume no match found - create implicit/speculative code segment AddressRange newCodeSegRange = collection.SubsumedPrimaryRange; CICodeSeg newCodeSeg = CreateCodeSeg(binaryInDevice, newCodeSegRange.Min, newCodeSegRange.Max, false); base.Trace("[CIProcess] EnsureCodeSegmentExistsForSymbol() - creating implicitly identified code seg: " + newCodeSeg.ToString() + " for symbol: " + aSymbol.ToString()); // Resolve it newCodeSeg.Resolve(aParams.DebugEngineView); } } }
internal override void DoFinalize(CIElementFinalizationParameters aParams, Queue <CIElement> aCallBackLast, bool aForceFinalize) { base.Trace(string.Format("[CIProcess] DoFinalize() - START - {0}", this)); // The process' children need to use a process-relative debug engine view in order that they // can correctly resolve any RAM-loaded code. // Therefore, rather than use the so-called "global" debug engine view (which only has // XIP visibility) we create a process-specific set of finalization parameters (for use with // the process' children) which contain a process-relative view of the world. using (CIElementFinalizationParameters processRelativeParameters = new CIElementFinalizationParameters(aParams.Engine, this.Name, this.CodeSegments)) { // Discard any implicit code segments. These are created automagically when an XIP symbol // is found. We'll re-create them anyway in a moment after the symbols have been updated. base.Trace(string.Format("[CIProcess] DoFinalize() - discarding implicit XIP CodeSegs... - {0}", this)); DiscardImplicitCodeSegments(); base.Trace(string.Format("[CIProcess] DoFinalize() - discarded implicit XIP CodeSegs - {0}", this)); // Tell our children base.DoFinalize(processRelativeParameters, aCallBackLast, aForceFinalize); // Finally, re-create implicit XIP codesegments base.Trace(string.Format("[CIProcess] DoFinalize() - creating implicit XIP CodeSegs... - {0}", this)); CreateImplicitCodeSegments(aParams); base.Trace(string.Format("[CIProcess] DoFinalize() - created implicit XIP CodeSegs - {0}", this)); } // base.Trace(string.Format("[CIProcess] DoFinalize() - END - {0}", this)); }
internal override void OnFinalize(CIElementFinalizationParameters aParams) { base.OnFinalize(aParams); // Cache file names CacheFileNames(aParams.DebugEngine); }
internal override void OnFinalize(CIElementFinalizationParameters aParams) { try { if (iType == TSpecificType.ETypeKey && (iValue is int)) { // Replace generic scan/key code with key name int keyCode = (int)iValue; string keyName = keyCode.ToString(); // if (aParams.DebugEngine.KeyBindings.IsKeyBindingTableAvailable) { keyName = aParams.DebugEngine.KeyBindings[keyCode]; } // System.Diagnostics.Debug.Assert(keyName != null); iValue = keyName; } else { // No operation required. } } finally { base.OnFinalize(aParams); } }
internal override void OnFinalize(CIElementFinalizationParameters aParams) { try { base.OnFinalize(aParams); } finally { } }
internal override void OnFinalize(CIElementFinalizationParameters aParams) { try { base.OnFinalize(aParams); } finally { Resolve(aParams.DebugEngineView); } }
private void CreateImplicitCodeSegments(CIElementFinalizationParameters aParams) { CIElementList <CISymbol> children = base.ChildrenByType <CISymbol>(TChildSearchType.EEntireHierarchy); base.Trace(string.Format("[CIProcess] CreateImplicitCodeSegments() - children count: {1}, {0}", this, children.Count)); // foreach (CISymbol symbol in children) { EnsureCodeSegmentExistsForSymbol(aParams, symbol); } }
internal void RunFinalizers(CIElementFinalizationParameters aParams) { Queue <CIElement> mustBeCalledLast = new Queue <CIElement>(); base.DoFinalize(aParams, mustBeCalledLast, false); // Now call the elements that are to be finalized last while (mustBeCalledLast.Count > 0) { CIElement child = mustBeCalledLast.Dequeue(); child.DoFinalize(aParams, mustBeCalledLast, true); } }
internal override void OnFinalize(CIElementFinalizationParameters aParams) { try { base.OnFinalize(aParams); } finally { CIStackBuilder builder = new CIStackBuilder(this, aParams.DebugEngine); builder.Build(TSynchronicity.ESynchronous); // iStackOutput = builder.StackEngine.DataOutput; // CreateEntries(); } }
internal override void OnFinalize(CIElementFinalizationParameters aParams) { try { base.OnFinalize(aParams); } finally { if (iAddress != 0) { if (iSymbolLocked == false) { iSymbol = aParams.DebugEngineView.Symbols[iAddress]; base.Trace(string.Format("[CISymbol] OnFinalize() - address: 0x{0:x8}, id: {1}, iSymbol: {2}", iAddress, base.Id, iSymbol)); } } } }
internal override void DoFinalize(CIElementFinalizationParameters aParams, Queue <CIElement> aCallBackLast, bool aForceFinalize) { CIContainer container = base.Container; // Find all the stacks and add them as children before we call the base class // method, since the base class will then take care of finalizing the new dynamically created // summarisable objects. CIElementList <CIStack> stacks = container.ChildrenByType <CIStack>(TChildSearchType.EEntireHierarchy); if (stacks != null && stacks.Count > 0) { foreach (CIStack stack in stacks) { CISummarisableEntity entity = this[stack]; if (entity == null) { entity = new CISummarisableEntity(stack); AddChild(entity); } } } // Now, make sure there are summarisable wrappers created for any threads which do not have associated // stacks. Call stacks will be unavailable, but there's still plenty of useful information at the thread // process and register levels. CIElementList <CIThread> threads = container.ChildrenByType <CIThread>(TChildSearchType.EEntireHierarchy); if (threads != null && threads.Count > 0) { foreach (CIThread thread in threads) { CISummarisableEntity entity = this[thread]; if (entity == null) { entity = new CISummarisableEntity(thread); AddChild(entity); } } } // Now run finalizers on children et al. base.DoFinalize(aParams, aCallBackLast, aForceFinalize); }
internal override void DoFinalize(CIElementFinalizationParameters aParams, Queue <CIElement> aCallBackLast, bool aForceFinalize) { base.DoFinalize(aParams, aCallBackLast, aForceFinalize); }
public CIContainerFinalizer(CIContainerCollection aCollection, CIEngine aEngine) : base(aCollection) { iFinalizationParameters = new CIElementFinalizationParameters(aEngine); }
internal override void OnFinalize(CIElementFinalizationParameters aParams) { base.OnFinalize(aParams); // BuildIndex(); }
internal override void OnFinalize(CIElementFinalizationParameters aParams) { base.OnFinalize(aParams); // DecodeTraces(aParams.DebugEngine.TraceDictionaries); }