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); } } }
private void CreateMissingWarning(CICodeSeg aCodeSeg) { CIMessageWarning warning = new CIMessageWarning(aCodeSeg.Container, LibResources.CIPDCodeSegAvailability_NoSymbols_Title); warning.AddLineFormatted(LibResources.CIPDCodeSegAvailability_NoSymbols_Description, aCodeSeg, aCodeSeg.OwningProcess.Name); // aCodeSeg.AddChild(warning); }
private void CreateMismatchWarning(CICodeSeg aCodeSeg) { CIMessageWarning warning = new CIMessageWarning(aCodeSeg.Container, LibResources.CIPDCodeSegAvailability_CodeSegMisMatch_Title); warning.AddLineFormatted(LibResources.CIPDCodeSegAvailability_CodeSegMisMatch_Description_L1, aCodeSeg, aCodeSeg.OwningProcess.Name); warning.AddLineFormatted(LibResources.CIPDCodeSegAvailability_CodeSegMisMatch_Description_L2, aCodeSeg.Base, aCodeSeg.MismatchAddress); // aCodeSeg.AddChild(warning); }
private CICodeSeg CreateCodeSeg(string aName, uint aBase, uint aLimit, bool aExplict) { CICodeSeg ret = new CICodeSeg(this); ret.Name = aName; ret.Base = aBase; ret.Limit = aLimit; ret.IsExplicit = aExplict; // Primary store is the child nodes base.AddChild(ret); base.Trace("[CIProcess] CreateCodeSeg() - this: {0}, ret: {1}", this, ret); return(ret); }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iSymbol, aParameters.Writer); aParameters.Writer.WriteElementString(SegConstants.CmnAddress, iSymbol.Symbol.Address.ToString("x8")); aParameters.Writer.WriteElementString(SegConstants.CmnSize, iSymbol.Symbol.Size.ToString("x8")); aParameters.Writer.WriteElementString(SegConstants.CmnName, iSymbol.Symbol.Name); aParameters.Writer.WriteElementString(SegConstants.Symbols_SymbolSet_Symbol_Object, iSymbol.Symbol.Object); // If there is a link to a code code segment, then write that too. CICodeSeg correspondingCodeSeg = iSymbol.CodeSegment; if (correspondingCodeSeg != null) { CXmlNode.WriteLink(correspondingCodeSeg.Id, SegConstants.CodeSegs, aParameters.Writer); } }
private void DiscardImplicitCodeSegments() { // Go through each child and see if it's a code seg. If it is, and if // it is implicit, throw it away int childCount = base.Count; for (int i = childCount - 1; i >= 0; i--) { CIElement element = base[i]; if (element is CICodeSeg) { CICodeSeg cs = (CICodeSeg)element; // if (!cs.IsExplicit) { base.Trace(string.Format("[CIProcess] DiscardImplicitCodeSegments() - dicarded: {0}", cs)); base.RemoveChild(cs); } } } }
public CXmlCodeSeg(CICodeSeg aCodeSeg) : base(SegConstants.CodeSegs_CodeSeg) { iCodeSeg = aCodeSeg; }
public CICodeSeg CreateCodeSeg(string aName, uint aBase, uint aLimit) { CICodeSeg ret = CreateCodeSeg(aName, aBase, aLimit, true); return(ret); }