public static CIRegister New(TArmRegisterType aType, uint aValue, string aName, CIRegisterList aList) { CIRegister ret = null; // switch (aType) { case TArmRegisterType.EArmReg_CPSR: ret = new CIRegisterCPSR(aList, aValue); break; case TArmRegisterType.EArmReg_FSR: ret = new CIRegisterFSR(aList, aValue); break; case TArmRegisterType.EArmReg_EXCCODE: ret = new CIRegisterExcCode(aList, aValue); break; default: ret = new CIRegister(aList, aType, aName, aValue); break; } // System.Diagnostics.Debug.Assert(ret.Type == aType); System.Diagnostics.Debug.Assert(ret.Value == aValue); System.Diagnostics.Debug.Assert(ret.Name == aName); // return(ret); }
public override void PrepareRows() { DataBindingModel.ClearRows(); // Type is common CIDBRow rowType = new CIDBRow(); rowType.Add(new CIDBCell("Type")); rowType.Add(new CIDBCell(TypeDescription)); DataBindingModel.Add(rowType); // We must prepare them by hand because we show // different content depending on the type of exit. if (Type == TExitType.EExitTypePending) { // Nothing to add } else if (Type == TExitType.EExitTypeException) { string code = ExceptionDescription; if (code != string.Empty) { CIDBRow rowExcCode = new CIDBRow(); rowExcCode.Add(new CIDBCell("Exception Code")); rowExcCode.Add(new CIDBCell(code)); DataBindingModel.Add(rowExcCode); } CIRegisterFSR fsr = RegisterFSR; if (fsr != null) { CIDBRow rowFSR = new CIDBRow(); rowFSR.Add(new CIDBCell("Fault Type")); rowFSR.Add(new CIDBCell(fsr.FaultDescription)); DataBindingModel.Add(rowFSR); } } else { // Panic, terminate CIDBRow rowCategory = new CIDBRow(); rowCategory.Add(new CIDBCell("Category")); rowCategory.Add(new CIDBCell(Category)); DataBindingModel.Add(rowCategory); CIDBRow rowReason = new CIDBRow(); rowReason.Add(new CIDBCell("Reason")); rowReason.Add(new CIDBCell(Reason.ToString())); DataBindingModel.Add(rowReason); CIDBRow rowFullPanic = new CIDBRow(); rowFullPanic.Add(new CIDBCell("In Full")); rowFullPanic.Add(new CIDBCell(string.Format("{0}-{1}", Category, Reason))); DataBindingModel.Add(rowFullPanic); } }