Contains all register and memory changes of a single instruction (including its program counter)
Because of the stream layout, the stream deserialization occurs in the section deserializer
 private void Log(OverflowType overflowType, UInt64 memStart, UInt64 memEnd, UInt64 size, InstructionDescription insn, IList<UInt64> bt, AnalyzeController ctrl)
 {
     XmlElement root = GenerateNode ("simple_heap_overflow");
     XmlHelper.WriteString (root, "OverflowType", overflowType.ToString());
     XmlHelper.WriteString (root, "MemStart", string.Format ("0x{0:X}", memStart));
     XmlHelper.WriteString (root, "MemEnd", string.Format ("0x{0:X}", memEnd));
     XmlHelper.WriteString (root, "Size", size.ToString());
     XmlHelper.WriteString (root, "At", BuildBacktraceString(bt));
 }
        protected UInt64? FindProgramCounter(InstructionDescription insn, IRegisterTypeResolver registerTypeResolver, Registers regs)
        {
            string programCounterName = registerTypeResolver.GetRegisterName (RegisterTypeEnum.ProgramCounter);
            Register pcReg = regs.FindRegisterByName (programCounterName);

            foreach (RegisterChange regChange in insn.RegisterChanges)
            {
                if (regChange.Regnum == pcReg.Num)
                    return ByteHelper.ByteArrayToUInt64 (regChange.Value, 0, regChange.Value.Length);
            }

            return null;
        }
        private void LogSavedRegister(string registerName, UInt64 registerAddress, UInt64 targetAddress, int size, InstructionDescription insn, AnalyzeController ctrl)
        {
            XmlElement root = GenerateNode ("saved_register");
            XmlHelper.WriteString (root, "Reg", registerName);
            XmlHelper.WriteString (root, "RegAddr", string.Format ("0x{0:X}", registerAddress));

            UInt64? pc = FindProgramCounter (insn, ctrl.RegisterTypeResolver, ctrl.TargetRegisters);

            if (pc != null)
                XmlHelper.WriteString (root, "At", string.Format ("0x{0:X}", pc.Value));
            else
                XmlHelper.WriteString (root, "At", "[unspecified]");

            XmlHelper.WriteString (root, "TargetAddr", string.Format ("0x{0:X}", targetAddress));
            XmlHelper.WriteInt (root, "TargetSize", size);
        }
 private void Log(MemoryZone memZone, UInt64 memStart, UInt64 memEnd, UInt64 size, InstructionDescription insn, AnalyzeController ctrl)
 {
     XmlElement root = GenerateNode ("memory_zones");
     XmlHelper.WriteString (root, "ZoneType", memZone.Zone.ToString());
     XmlHelper.WriteString(root, "ZoneStart", string.Format("0x{0:X}", memZone.StartAddress));
     XmlHelper.WriteString(root, "ZoneEnd", string.Format("0x{0:X}", memZone.EndAddress));
     XmlHelper.WriteString (root, "MemStart", string.Format ("0x{0:X}", memStart));
     XmlHelper.WriteString (root, "MemEnd", string.Format ("0x{0:X}", memEnd));
     XmlHelper.WriteString (root, "At", FindProgramCounter(insn, ctrl.RegisterTypeResolver, ctrl.TargetRegisters).ToString());
 }
        private void SavedRegistersInRange(IStackFrameInfo stackFrameInfo, UInt64 address, int size, InstructionDescription insn, AnalyzeController ctrl)
        {
            //_log.DebugFormat ("address=0x{0:X} size={1}", address, size);
            foreach (string savedRegisterName in stackFrameInfo.SavedRegisters)
            {
                IAddressSpecifier savedRegisterAddressSpecifier = stackFrameInfo.GetSavedRegisterAddress (savedRegisterName);
                UInt64? savedRegisterAddress = savedRegisterAddressSpecifier.ResolveAddress ();

                if (savedRegisterAddress != null)
                {
                    UInt64 regSize = ctrl.TargetRegisters.FindRegisterByName(savedRegisterName).Size;

                    if((savedRegisterAddress.Value + regSize > address) &&
                       (savedRegisterAddress.Value + regSize < address + (UInt64)size ||
                       (savedRegisterAddress.Value  < address + (UInt64)size && savedRegisterAddress.Value + regSize >= address + (UInt64)size)))
                        LogSavedRegister (savedRegisterName, savedRegisterAddress.Value, address, size, insn, ctrl);
                }
            }
        }