当前位置: 首页>>代码示例>>C#>>正文


C# Core.Frame类代码示例

本文整理汇总了C#中Reko.Core.Frame的典型用法代码示例。如果您正苦于以下问题:C# Frame类的具体用法?C# Frame怎么用?C# Frame使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Frame类属于Reko.Core命名空间,在下文中一共展示了Frame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Setup

 public void Setup()
 {
     f = new Frame(PrimitiveType.Word16);
     argOff = f.EnsureStackArgument(4, PrimitiveType.Word16);
     argSeg = f.EnsureStackArgument(6, PrimitiveType.SegmentSelector);
     arg_alias = f.EnsureStackArgument(4, PrimitiveType.Pointer32);
 }
开发者ID:nemerle,项目名称:reko,代码行数:7,代码来源:VariableTests.cs

示例2: W32Mips_Trampoline

        public void W32Mips_Trampoline()
        {
            var instrs = new List<RtlInstructionCluster>();
            var frame = new Frame(PrimitiveType.Pointer32);
            var r9 = frame.EnsureRegister(new RegisterStorage("r9", 9, PrimitiveType.Word32));
            var rtl = new RtlTrace(0x123460)
            {
                m => m.Assign(r9, 0x00030000),
                m => m.Assign(r9, m.LoadDw(m.IAdd(r9, 0x1234))),
                m => m.Goto(r9)
            };

            var host = mr.Stub<IRewriterHost>();
            var services = mr.Stub<IServiceProvider>();
            var arch = mr.Stub<IProcessorArchitecture>();
            var state = mr.Stub<ProcessorState>();
            var addr = Address.Ptr32(0x00031234);
            arch.Stub(a => a.CreateFrame()).Return(frame);
            arch.Stub(a => a.CreateProcessorState()).Return(state);
            arch.Stub(a => a.CreateRewriter(null, null, null, null)).IgnoreArguments().Return(rtl);
            arch.Stub(a => a.MakeAddressFromConstant(Arg<Constant>.Is.NotNull)).Return(addr);
            host.Stub(h => h.GetImportedProcedure(
                Arg<Address>.Is.Equal(addr),
                Arg<Address>.Is.NotNull)).Return(new ExternalProcedure("foo", new ProcedureSignature()));
            mr.ReplayAll();

            var platform = new Win32MipsPlatform(services, arch);
            var result = platform.GetTrampolineDestination(new LeImageReader(new byte[0]), host);
            Assert.IsNotNull(result);
        }
开发者ID:nemerle,项目名称:reko,代码行数:30,代码来源:Win32MipsPlatformTests.cs

示例3: Setup

		public void Setup()
		{
            var arch = new IntelArchitecture(ProcessorMode.Protected32);
			f = arch.CreateFrame();
            liveness = new IdentifierLiveness(arch);
			isLiveHelper = new RegisterLiveness.IsLiveHelper(arch);
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:7,代码来源:IsLiveHelperTests.cs

示例4: Setup

		public void Setup()
		{
            var arch = new X86ArchitectureFlat32();
			f = arch.CreateFrame();
            liveness = new IdentifierLiveness(arch);
			isLiveHelper = new RegisterLiveness.IsLiveHelper(arch);
		}
开发者ID:relaxar,项目名称:reko,代码行数:7,代码来源:IsLiveHelperTests.cs

示例5: CreateBlockFlow

 private BlockFlow CreateBlockFlow(Block block, Frame frame)
 {
     return new BlockFlow(
         block,
         prog.Architecture.CreateRegisterBitset(),
         new SymbolicEvaluationContext(prog.Architecture, frame));
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:7,代码来源:TerminationAnalysisTests.cs

示例6: Deserialize

        public override FunctionType Deserialize(SerializedSignature ss, Frame frame)
        {
            if (ss == null)
                return new FunctionType();
            if (ss == null)
                return null;
            var argser = new ArgumentDeserializer(this, Architecture, frame, 0, Architecture.WordWidth.Size);
            Identifier ret = null;

            if (ss.ReturnValue != null)
            {
                ret = argser.DeserializeReturnValue(ss.ReturnValue);
            }

            var args = new List<Identifier>();
            this.gr = 0;
            if (ss.Arguments != null)
            {
                for (int iArg = 0; iArg < ss.Arguments.Length; ++iArg)
                {
                    var sArg = ss.Arguments[iArg];
                    Identifier arg = DeserializeArgument(argser, sArg);
                    args.Add(arg);
                }
            }

            var sig = new FunctionType(ret, args.ToArray());
            return sig;
        }
开发者ID:relaxar,项目名称:reko,代码行数:29,代码来源:Rt11ProcedureSerializer.cs

示例7: CreateBlockFlow

 private BlockFlow CreateBlockFlow(Block block, Frame frame)
 {
     return new BlockFlow(
         block,
         new HashSet<RegisterStorage>(),
         new SymbolicEvaluationContext(program.Architecture, frame));
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:7,代码来源:TerminationAnalysisTests.cs

示例8: RtlStatementStream

 public RtlStatementStream(uint address, Frame frame)
 {
     this.linAddress = address;
     this.arch = new FakeArchitecture();
     this.frame = frame;
     this.stms = new List<RtlInstructionCluster>();
 }
开发者ID:nemerle,项目名称:reko,代码行数:7,代码来源:RtlStatementStream.cs

示例9: Setup

 public void Setup()
 {
     this.mr = new MockRepository();
     this.fsSvc = mr.StrictMock<IFileSystemService>();
     this.tllSvc = mr.Stub<ITypeLibraryLoaderService>();
     this.services = mr.StrictMock<IServiceProvider>();
     var cfgSvc = mr.Stub<IConfigurationService>();
     var env = mr.Stub<OperatingEnvironment>();
     this.arch = new M68kArchitecture();
     this.rtls = new List<RtlInstruction>();
     this.m = new RtlEmitter(rtls);
     cfgSvc.Stub(c => c.GetEnvironment("amigaOS")).Return(env);
     env.Stub(e => e.TypeLibraries).Return(new List<ITypeLibraryElement>());
     env.Stub(e => e.CharacteristicsLibraries).Return(new List<ITypeLibraryElement>());
     env.Stub(e => e.Options).Return(new Dictionary<string, object>
     {
         { "versionDependentLibraries", new Dictionary<string,object>
             {
                 { "33", new List<object> { "exec_v33", "dos_v33" } },
                 { "34", new List<object> { "exec_v34", "dos_v34" } },
             }
         }
     });
     this.services.Stub(s => s.GetService(typeof(IConfigurationService))).Return(cfgSvc);
     this.services.Stub(s => s.GetService(typeof(IFileSystemService))).Return(fsSvc);
     this.services.Stub(s => s.GetService(typeof(ITypeLibraryLoaderService))).Return(tllSvc);
     this.frame = new Frame(arch.FramePointerType);
 }
开发者ID:relaxar,项目名称:reko,代码行数:28,代码来源:AmigaOSPlatformTests.cs

示例10: Deserialize

        public override ProcedureSignature Deserialize(SerializedSignature ss, Frame frame)
        {
            if (ss == null)
                return null;
            this.argser = new ArgumentSerializer(this, Architecture, frame, ss.Convention);
            Identifier ret = null;
            int fpuDelta = FpuStackOffset;

            FpuStackOffset = 0;
            if (ss.ReturnValue != null)
            {
                ret = argser.DeserializeReturnValue(ss.ReturnValue);
                fpuDelta += FpuStackOffset;
            }

            FpuStackOffset = 0;
            var args = new List<Identifier>();
            if (ss.Arguments != null)
            {
                for (int iArg = 0; iArg < ss.Arguments.Length; ++iArg)
                {
                    var sArg = ss.Arguments[iArg];
                    var arg = DeserializeArgument(sArg, iArg, ss.Convention);
                    args.Add(arg);
                }
                fpuDelta -= FpuStackOffset;
            }
            FpuStackOffset = fpuDelta;

            var sig = new ProcedureSignature(ret, args.ToArray());
            ApplyConvention(ss, sig);
            return sig;
        }
开发者ID:feelworld,项目名称:reko,代码行数:33,代码来源:X86_64ProcedureSerializer.cs

示例11: Deserialize

        public override ProcedureSignature Deserialize(SerializedSignature ss, Frame frame)
        {
            if (ss == null)
                return null;
            var argser = new ArgumentSerializer(this, Architecture, frame, ss.Convention);
            Identifier ret = null;

            if (ss.ReturnValue != null)
            {
                ret = argser.DeserializeReturnValue(ss.ReturnValue);
            }

            var args = new List<Identifier>();
            if (ss.Arguments != null)
            {
                for (int iArg = 0; iArg < ss.Arguments.Length; ++iArg)
                {
                    var sArg = ss.Arguments[iArg];
                    Identifier arg = argser.Deserialize(sArg);
                    args.Add(arg);
                }
            }

            var sig = new ProcedureSignature(ret, args.ToArray());
            return sig;
        }
开发者ID:gitter-badger,项目名称:reko,代码行数:26,代码来源:M68kProcedureSerializer.cs

示例12: OperandRewriter

 public OperandRewriter(IntelArchitecture arch, ExpressionEmitter emitter, Frame frame, IRewriterHost host)
 {
     this.arch = arch;
     this.m = emitter;
     this.frame = frame;
     this.host = host;
 }
开发者ID:uxmal,项目名称:reko,代码行数:7,代码来源:OperandRewriter.cs

示例13: OperandRewriter

 public OperandRewriter(M68kArchitecture arch, RtlEmitter emitter, Frame frame, PrimitiveType dataWidth)
 {
     this.arch = arch;
     this.m = emitter;
     this.frame = frame;
     this.DataWidth = dataWidth;
 }
开发者ID:nemerle,项目名称:reko,代码行数:7,代码来源:OperandRewriter.cs

示例14: GetInstructionStream

 protected override IEnumerable<RtlInstructionCluster> GetInstructionStream(Frame frame, IRewriterHost host)
 {
     return arch.CreateRewriter(
         new LeImageReader(image, 0),
         arch.CreateProcessorState(),
         frame,
         this.host);
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:8,代码来源:X86RewriterTests.cs

示例15: Setup

		public void Setup()
		{
            arch = new IntelArchitecture(ProcessorMode.Real);
			f = new Frame(PrimitiveType.Word16);
			argOff = f.EnsureStackArgument(4, PrimitiveType.Word16);
			argSeg = f.EnsureStackArgument(6, PrimitiveType.SegmentSelector);
			arg_alias = f.EnsureStackArgument(4, PrimitiveType.Pointer32);
		}
开发者ID:gh0std4ncer,项目名称:reko,代码行数:8,代码来源:VariableTests.cs


注:本文中的Reko.Core.Frame类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。