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


C# Core.ProcessorState类代码示例

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


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

示例1: StartupFinder

 public StartupFinder(IServiceProvider services, Program program, Address addrStart)
 {
     this.services = services;
     this.prog= program;
     this.start = addrStart;
     this.state = program.Architecture.CreateProcessorState();
 }
开发者ID:relaxar,项目名称:reko,代码行数:7,代码来源:StartupFinder.cs

示例2: BuildAux

        public List<Address> BuildAux(Backwalker bw, Address addrFrom, ProcessorState state)
        {
            int limit = 0;
            int[] permutation = null;
            foreach (BackwalkOperation op in bw.Operations)
            {
                BackwalkError err = op as BackwalkError;
                if (err != null)
                {
                    return PostError(err.ErrorMessage, addrFrom, bw.VectorAddress);
                }
                var deref = op as BackwalkDereference;
                if (deref != null)
                {
                    permutation = BuildMapping(deref, limit);
                }
                limit = op.Apply(limit);
            }
            if (limit == 0)
                return PostError("Unable to determine limit", addrFrom, bw.VectorAddress);

            return BuildTable(
                bw.VectorAddress, 
                limit, 
                permutation,
                (bw.Stride == 1 || bw.Stride == 0) && bw.JumpSize > 1 
                    ? bw.JumpSize 
                    : bw.Stride,
                state);
        }
开发者ID:relaxar,项目名称:reko,代码行数:30,代码来源:VectorBuilder.cs

示例3: CreateWorkItem

 private BlockWorkitem CreateWorkItem(Address addr, ProcessorState state)
 {
     return new BlockWorkitem(
         scanner, 
         program,
         state,
         addr);
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:8,代码来源:BlockWorkitemTests.cs

示例4: FindService

 public override SystemService FindService(int vector, ProcessorState state)
 {
     if (TypeLibs.Length == 0)
         return null;
     SystemService svc;
     this.TypeLibs[0].ServicesByVector.TryGetValue(vector&0xFFFF , out svc);
     return svc;
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:8,代码来源:MacOSClassic.cs

示例5: CreateRewriter

 public override IEnumerable<RtlInstructionCluster> CreateRewriter(ImageReader rdr, ProcessorState state, Frame frame, IRewriterHost host)
 {
     return new MipsRewriter(
         this,
         new MipsDisassembler(this, rdr, IsVersion6OrLater),
         frame,
         host);
 }
开发者ID:uxmal,项目名称:reko,代码行数:8,代码来源:MipsProcessorArchitecture.cs

示例6: CreateRewriter

 public IEnumerable<RtlInstructionCluster> CreateRewriter(ImageReader rdr, ProcessorState state, Frame frame, IRewriterHost host)
 {
     var linAddr = rdr.Address.ToLinear();
     RtlTrace trace;
     if (!rewriters.Traces.TryGetValue(rdr.Address, out trace))
         NUnit.Framework.Assert.Fail(string.Format("Unexpected request for a rewriter at address {0}", rdr.Address));
     return trace;
 }
开发者ID:melbcat,项目名称:reko,代码行数:8,代码来源:FakeArchitecture.cs

示例7: FindService

		public override SystemService FindService(int vector, ProcessorState state)
		{
			foreach (SystemService svc in realModeServices)
			{
				if (svc.SyscallInfo.Matches(vector, state))
					return svc;
			}
			return null;
		}
开发者ID:gh0std4ncer,项目名称:reko,代码行数:9,代码来源:MsdosPlatform.cs

示例8: Build

 public List<Address> Build(Address addrTable, Address addrFrom, ProcessorState state)
 {
     bw = new Backwalker(this, null, null);
     if (bw == null)
         return null;
     List<BackwalkOperation> operations = bw.BackWalk(null);
     if (operations == null)
         return PostError("Unable to determine limit", addrFrom, addrTable);
     return BuildAux(bw, addrFrom, state);
 }
开发者ID:relaxar,项目名称:reko,代码行数:10,代码来源:VectorBuilder.cs

示例9: FindService

 public override SystemService FindService(int vector, ProcessorState state)
 {
     EnsureTypeLibraries();
     return this.typelibs
         .Where(t => t.ServicesByVector != null && t.ServicesByVector.Count > 0)
         .SelectMany(t => t.ServicesByVector)
         .Where(svc => svc.Value.SyscallInfo.Matches(vector, state))
         .Select(svc => svc.Value)
         .FirstOrDefault();
 }
开发者ID:feelworld,项目名称:reko,代码行数:10,代码来源:SysVPlatform.cs

示例10: EntryPoint

		public EntryPoint(Address addr, string name, ProcessorState state)
		{
            if (addr == null)
                throw new ArgumentNullException("addr");
            if (state == null)
				throw new ArgumentNullException("state");
			this.Address = addr;
			this.Name = name;
			this.ProcessorState = state;
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:10,代码来源:EntryPoint.cs

示例11: FindService

        public override SystemService FindService(int vector, ProcessorState state)
		{
            EnsureTypeLibraries(PlatformIdentifier);
			foreach (SystemService svc in realModeServices)
			{
				if (svc.SyscallInfo.Matches(vector, state))
					return svc;
			}
			return null;
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:10,代码来源:MsdosPlatform.cs

示例12: Setup

 public void Setup()
 {
     arch = new IntelArchitecture(ProcessorMode.Protected32);
     m = new ProcedureBuilder();
     state = arch.CreateProcessorState();
     expSimp = new ExpressionSimplifier(
             new IntelArchitecture(ProcessorMode.Protected32).CreateProcessorState());
     SCZO = m.Frame.EnsureFlagGroup((uint)(FlagM.SF | FlagM.CF | FlagM.ZF | FlagM.OF), "SCZO", PrimitiveType.Byte);
     host = new BackwalkerHost();
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:10,代码来源:BackwalkerTests.cs

示例13: FindService

 public override SystemService FindService(int vector, ProcessorState state)
 {
     base.EnsureTypeLibraries(base.PlatformIdentifier);
     foreach (var module in this.Metadata.Modules.Values)
     {
         SystemService svc;
         if (module.ServicesByVector.TryGetValue(vector & 0xFFFF, out svc))
             return svc;
     }
     return null;
 }
开发者ID:relaxar,项目名称:reko,代码行数:11,代码来源:MacOSClassic.cs

示例14: Matches

 private bool Matches(ProcessorState state)
 {
     for (int i = 0; i < RegisterValues.Length; ++i)
     {
         Constant v = state.GetRegister(RegisterValues[i].Register);
         if (v == null || v == Constant.Invalid)
             return false;
         if (v.ToUInt32() != RegisterValues[i].Value)
             return false;
     }
     return true;
 }
开发者ID:relaxar,项目名称:reko,代码行数:12,代码来源:SystemService.cs

示例15: ReadSegmentedCodeAddress

 protected Address ReadSegmentedCodeAddress(int byteSize, ImageReader rdr, ProcessorState state)
 {
     if (byteSize == PrimitiveType.Word16.Size)
     {
         return Address.SegPtr(state.GetRegister(Registers.cs).ToUInt16(), rdr.ReadLeUInt16());
     }
     else
     {
         ushort off = rdr.ReadLeUInt16();
         ushort seg = rdr.ReadLeUInt16();
         return Address.SegPtr(seg, off);
     }
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:13,代码来源:ProcessorMode.cs


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