private void AddBits0To8(CIRegisterVisualization aVisualization, bool aIsIABitReserved) { uint value = aVisualization.Register.Value; // Processor mode CIRegisterVisBitRange rangeProcMode = new CIRegisterVisBitRange(Container, 0, 4, "Processor Mode"); rangeProcMode.Interpretation = ArmRegisterBankUtils.BankAsStringLong(ProcessorMode); rangeProcMode.ExtractBits(value, "########", "########", "########", "###11111"); aVisualization.AddChild(rangeProcMode); // Thumb bit CIRegisterVisBit thumbBit = CreateYesNoBit(aVisualization, 5, "########", "########", "########", "##1#####", false, "Thumb Mode", "T"); aVisualization.AddChild(thumbBit); // FIQ, IRQ bits CIRegisterVisBitGroup gpIRQs = new CIRegisterVisBitGroup(Container, "Interrupt Disabled Bits"); CIRegisterVisBit fiqBit = CreateYesNoBit(aVisualization, 6, "########", "########", "########", "#1######", false, "FIQ Disabled", "F"); gpIRQs.Add(fiqBit); CIRegisterVisBit irqBit = CreateYesNoBit(aVisualization, 7, "########", "########", "########", "1#######", false, "IRQ Disabled", "I"); gpIRQs.Add(irqBit); // Imprecise Abort bit - reserved in non-ARMv5 CIRegisterVisBit iaBit = CreateYesNoBit(aVisualization, 8, "########", "########", "#######1", "########", aIsIABitReserved, "Imprecise Aborts", "A"); gpIRQs.Add(iaBit); aVisualization.AddChild(gpIRQs); }
private void PrepareMessage() { CIMessage message = CIMessage.NewMessage(Container); message.Title = "Processor Mode"; message.Description = string.Format("CPSR (Current Processor Status Register) indicates that the processor was in [{0}] mode.", ArmRegisterBankUtils.BankAsStringLong(ProcessorMode)); base.AddChild(message); }
protected string CreateIdentifierText(CISummarisableEntity aEntry) { StringBuilder ret = new StringBuilder(); // if (aEntry.IsAvailable(CISummarisableEntity.TElement.EElementThread)) { ret.AppendFormat(LibResources.CIProblemDetector_Msg_Thread, aEntry.Thread.FullName); } else if (aEntry.IsAvailable(CISummarisableEntity.TElement.EElementStack)) { ret.AppendFormat(LibResources.CIProblemDetector_Msg_Stack, ArmRegisterBankUtils.BankAsStringLong(aEntry.Stack.Type)); } // return(ret.ToString()); }
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); } }
public override void AddChild(CIElement aChild) { // We support 4 types of children at the moment. // Registers, stacks and exit info, messages. if (aChild.GetType() == typeof(CIExitInfo)) { if (base.ChildrenByType <CIExitInfo>().Count != 0) { throw new ArgumentException("Exit Info already associated with the thread"); } } else if (aChild.GetType() == typeof(CIThreadRegisterListCollection)) { if (base.ChildrenByType <CIThreadRegisterListCollection>().Count != 0) { throw new ArgumentException("Registers already associated with the thread"); } } else if (aChild.GetType() == typeof(CIStack)) { CIStack stack = (CIStack)aChild; // We must ensure we don't already have a stack of the specified mode // associated with the thread. bool exists = iStacks.ContainsKey(stack.Type); if (exists) { throw new ArgumentException(ArmRegisterBankUtils.BankAsStringLong(stack.Type) + " mode stack already registered with thread"); } else { iStacks.Add(stack.Type, stack); } } // base.AddChild(aChild); }
public override string ToString() { return(ArmRegisterBankUtils.BankAsString(Bank)); }