protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iProcess, aParameters.Writer); aParameters.Writer.WriteElementString(SegConstants.CmnName, iProcess.Name); // UIDs if (iProcess.Uids[0] != 0) { aParameters.Writer.WriteElementString(SegConstants.Processes_Process_UID1, iProcess.Uids[0].ToString("x8")); } if (iProcess.Uids[1] != 0) { aParameters.Writer.WriteElementString(SegConstants.Processes_Process_UID2, iProcess.Uids[1].ToString("x8")); } if (iProcess.Uids[2] != 0) { aParameters.Writer.WriteElementString(SegConstants.Processes_Process_UID3, iProcess.Uids[2].ToString("x8")); } // SID if (iProcess.SID != 0) { aParameters.Writer.WriteElementString(SegConstants.Processes_Process_SID, iProcess.SID.ToString("x8")); } // Generation aParameters.Writer.WriteElementString(SegConstants.Processes_Process_Generation, iProcess.Generation.ToString()); // Priority if (iProcess.Priority != 0) { aParameters.Writer.WriteElementString(SegConstants.CmnPriority, iProcess.Priority.ToString()); } }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iCodeSeg, aParameters.Writer); aParameters.Writer.WriteElementString(SegConstants.CmnName, iCodeSeg.Name); aParameters.Writer.WriteElementString(SegConstants.CmnBase, iCodeSeg.Base.ToString("x8")); aParameters.Writer.WriteElementString(SegConstants.CmnSize, iCodeSeg.Size.ToString("x8")); aParameters.Writer.WriteElementString(SegConstants.CmnRange, iCodeSeg.Range.ToString()); if (iCodeSeg.Checksum != 0) { aParameters.Writer.WriteElementString(SegConstants.CmnChecksum, iCodeSeg.Checksum.ToString("x8")); } // Write any messages CXmlSegBase.XmlSerializeMessages(aParameters, iCodeSeg); }
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); } }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iRegister, aParameters.Writer); // Map the ArmRegister name onto the register names we expose via XML. In reality, the only register names // that need remapping are R13, R14 and R15. string regName = RemapRegisterName(); aParameters.Writer.WriteElementString(SegConstants.CmnName, regName); aParameters.Writer.WriteElementString(SegConstants.CmnValue, iRegister.Value.ToString("x8")); if (iRegister.Symbol != null && CXmlSymbol.IsSerializable(iRegister.Symbol)) { CXmlNode.WriteLink(iRegister.Symbol.Id, SegConstants.Symbols, aParameters.Writer); } // Write any messages CXmlSegBase.XmlSerializeMessages(aParameters, iRegister); }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iInfo, aParameters.Writer); WriteIfNotZero(aParameters.Writer, SegConstants.MemoryInfo_Free, iInfo.Free); WriteIfNotZero(aParameters.Writer, SegConstants.MemoryInfo_Capacity, iInfo.Capacity); if (iInfo.Type == CIMemoryInfo.TType.ETypeDrive) { WriteDrivePath(aParameters.Writer, iInfo.DriveNumber); WriteIfNotZero(aParameters.Writer, SegConstants.MemoryInfo_UID, iInfo.UID); WriteStringIfNotEmpty(aParameters.Writer, SegConstants.MemoryInfo_Drive_Vendor, iInfo.Vendor); } else if (iInfo.Type == CIMemoryInfo.TType.ETypeRAM) { } // Reuse "name" tag for volume name WriteStringIfNotEmpty(aParameters.Writer, SegConstants.CmnName, iInfo.VolumeName); }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iStack, aParameters.Writer); if (iStack.Registers != null) { CXmlNode.WriteLink(iStack.Registers.Id, SegConstants.Registers, aParameters.Writer); } if (iStack.OwningThread != null) { CXmlNode.WriteLink(iStack.OwningThread.Id, SegConstants.Threads, aParameters.Writer); } aParameters.Writer.WriteElementString(SegConstants.CmnBase, iStack.Base.ToString("x8")); aParameters.Writer.WriteElementString(SegConstants.CmnSize, iStack.Size.ToString("x")); aParameters.Writer.WriteElementString(SegConstants.CmnRange, iStack.Range.ToString()); // Write defect hash try { MobileCrashHashBuilder hashBuilder = MobileCrashHashBuilder.New(MobileCrashHashBuilder.TConfiguration.EDefault, iStack); if (hashBuilder != null) { aParameters.Writer.WriteElementString(SegConstants.Stacks_Stack_Hash, hashBuilder.GetHash()); } // Write detailed hash hashBuilder = MobileCrashHashBuilder.New(MobileCrashHashBuilder.TConfiguration.EDetailed, iStack, MobileCrashHashBuilder.KDetailedNumberOfStackEntriesToCheckForSymbols); if (hashBuilder != null) { aParameters.Writer.WriteElementString(SegConstants.Stacks_Stack_Detailed_Hash, hashBuilder.GetHash()); } } catch (Exception) { // Could not create MobileCrashHashBuilder, ignore. } // Write any messages CXmlSegBase.XmlSerializeMessages(aParameters, iStack); }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iValue, aParameters.Writer); aParameters.Writer.WriteElementString(SegConstants.ValueInterpretation_Entry_Hex, iValue.Value.ToString("x8")); aParameters.Writer.WriteElementString(SegConstants.ValueInterpretation_Entry_Binary, iValue.Binary); aParameters.Writer.WriteElementString(SegConstants.CmnSize, iValue.Size.ToString()); // Endianness aParameters.Writer.WriteStartElement(SegConstants.ValueInterpretation_Entry_Endianness); aParameters.Writer.WriteAttributeString(SegConstants.CmnType, SegConstants.ValueInterpretation_Entry_Endianness_Little); aParameters.Writer.WriteAttributeString(SegConstants.ValueInterpretation_Entry_Endianness_Bit0, SegConstants.ValueInterpretation_Entry_Endianness_Bit0_Right); aParameters.Writer.WriteEndElement(); // Associated register CXmlNode.WriteLink(iValue.Register.Id, SegConstants.Registers, aParameters.Writer); // Description aParameters.Writer.WriteElementString(SegConstants.ValueInterpretation_Entry_Description, iValue.Description); }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iList, aParameters.Writer); // Abbreviated type string typeAbbreviated = ArmRegisterBankUtils.BankAsString(iList.Bank); aParameters.Writer.WriteElementString(SegConstants.CmnType, typeAbbreviated); // Long type string typeLong = ArmRegisterBankUtils.BankAsStringLong(iList.Bank); aParameters.Writer.WriteElementString(SegConstants.CmnName, typeLong); // Link to thread if (iList.OwningThread != null) { CXmlNode.WriteLink(iList.OwningThread.Id, SegConstants.Threads, aParameters.Writer); } }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iThread, aParameters.Writer); aParameters.Writer.WriteElementString(SegConstants.CmnName, iThread.Name); aParameters.Writer.WriteElementString(SegConstants.Threads_Thread_FullName, iThread.FullName); // Parent process if (iThread.OwningProcess != null) { CXmlNode.WriteLink(iThread.OwningProcess.Id, SegConstants.Processes, aParameters.Writer); } // Thread priority if (iThread.Priority != 0) { aParameters.Writer.WriteElementString(SegConstants.CmnPriority, iThread.Priority.ToString()); } // Write any messages CXmlSegBase.XmlSerializeMessages(aParameters, iThread); }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iMessage, aParameters.Writer); aParameters.Writer.WriteElementString(SegConstants.CmnType, iMessage.TypeName); aParameters.Writer.WriteElementString(SegConstants.Messages_Message_Title, iMessage.Title); }
protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters) { CXmlNode.WriteId(iBinaryData, aParameters.Writer); aParameters.Writer.WriteElementString(SegConstants.CmnName, iBinaryData.Name); }