• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IProcessorArchitecture类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: CreateExternalProcedure

		public ExternalProcedure CreateExternalProcedure(IProcessorArchitecture arch)
		{
            if (Characteristics == null)
                return new ExternalProcedure(Name, Signature);
            else
                return new ExternalProcedure(Name, Signature, Characteristics);
		}
开发者ID:relaxar,项目名称:reko,代码行数:7,代码来源:SystemService.cs


示例2: Setup

		public void Setup()
		{
			ssaIds = new SsaIdentifierCollection();
            mr = new MockRepository();
            arch = mr.Stub<IProcessorArchitecture>();
            importResolver = mr.Stub<IImportResolver>();
		}
开发者ID:uxmal,项目名称:reko,代码行数:7,代码来源:ValuePropagationTests.cs


示例3: ArgumentSerializer

 public ArgumentSerializer(ProcedureSerializer procSer, IProcessorArchitecture arch, Frame frame, string callingConvention)
 {
     this.procSer = procSer;
     this.arch = arch;
     this.frame = frame;
     this.convention = callingConvention;
 }
开发者ID:nemerle,项目名称:reko,代码行数:7,代码来源:ArgumentSerializer.cs


示例4: Win32Platform

        //$TODO: http://www.delorie.com/djgpp/doc/rbinter/ix/29.html int 29 for console apps!
        //$TODO: http://msdn.microsoft.com/en-us/data/dn774154(v=vs.99).aspx

		public Win32Platform(IServiceProvider services, IProcessorArchitecture arch) : base(services, arch)
		{
            int3svc = new SystemService
            {
                SyscallInfo = new SyscallInfo
                {
                    Vector = 3,
                    RegisterValues = new RegValue[0],
                },
                Name = "int3",
                Signature = new ProcedureSignature(null, new Identifier[0]),
                Characteristics = new ProcedureCharacteristics(),
            };
            var frame = arch.CreateFrame();
            int29svc = new SystemService
            {
                SyscallInfo = new SyscallInfo
                {
                    Vector = 0x29,
                    RegisterValues = new RegValue[0]
                },
                Name = "__fastfail",
                Signature = new ProcedureSignature(
                    null,
                    frame.EnsureRegister(Registers.ecx)), //$bug what about win64?
                Characteristics = new ProcedureCharacteristics
                {
                    Terminates = true
                }
            };
        }
开发者ID:melbcat,项目名称:reko,代码行数:34,代码来源:Win32Platform.cs


示例5: Program

 public Program(SegmentMap segmentMap, IProcessorArchitecture arch, IPlatform platform) : this()
 {
     this.SegmentMap = segmentMap;
     this.ImageMap = segmentMap.CreateImageMap();
     this.Architecture = arch;
     this.Platform = platform;
 }
开发者ID:relaxar,项目名称:reko,代码行数:7,代码来源:Program.cs


示例6: Given_Architecture

 private void Given_Architecture()
 {
     this.arch = mr.StrictMock<IProcessorArchitecture>();
     this.arch.Stub(a => a.Name).Return("testArch");
     this.arch.Stub(a => a.SaveUserOptions()).Return(null);
     this.cfgSvc.Stub(c => c.GetArchitecture("testArch")).Return(arch);
 }
开发者ID:relaxar,项目名称:reko,代码行数:7,代码来源:SerializedProjectTests.cs


示例7: LoadRealmodeServices

		public void LoadRealmodeServices(IProcessorArchitecture arch)
		{
			string prefix = Environment.GetEnvironmentVariable("DECOMPILERROOTDIR") ?? ".";
			// TODO: extract runtime files ( like "realmodeintservices.xml") to their own directory ?
			string libPath = Path.Combine(prefix,"src","Environments","Msdos","realmodeintservices.xml");
			if (!File.Exists (libPath))
			{
                prefix = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
				libPath = Path.Combine(prefix,"realmodeintservices.xml");
				if (!File.Exists(libPath))
				{
					libPath = Path.Combine(Directory.GetCurrentDirectory() , "realmodeintservices.xml");
				}
			}

            SerializedLibrary lib;
            using (FileStream stm = new FileStream(libPath, FileMode.Open))
			{
                lib = SerializedLibrary.LoadFromStream(stm);
			}

            int i = 0;
			realModeServices = new SystemService[lib.Procedures.Count];
			foreach (SerializedService ssvc in lib.Procedures)
			{
				realModeServices[i++] = ssvc.Build(arch);
			}
		}
开发者ID:killbug2004,项目名称:reko,代码行数:28,代码来源:MsdosPlatform.cs


示例8: Program

 public Program(LoadedImage image, ImageMap imageMap, IProcessorArchitecture arch, Platform platform) : this()
 {
     this.Image = image;
     this.ImageMap = imageMap;
     this.Architecture = arch;
     this.Platform = platform;
 }
开发者ID:melbcat,项目名称:reko,代码行数:7,代码来源:Program.cs


示例9: Setup

 public void Setup()
 {
     this.mr = new MockRepository();
     this.sc = new ServiceContainer();
     loader = mr.Stub<ILoader>();
     arch = mr.StrictMock<IProcessorArchitecture>();
     Address dummy;
     arch.Stub(a => a.TryParseAddress(null, out dummy)).IgnoreArguments().WhenCalled(m =>
     {
         Address addr;
         var sAddr = (string)m.Arguments[0];
         var iColon = sAddr.IndexOf(':');
         if (iColon > 0)
         {
             addr = Address.SegPtr(
                 Convert.ToUInt16(sAddr.Remove(iColon)),
                 Convert.ToUInt16(sAddr.Substring(iColon+1)));
             m.ReturnValue = true;
         }
         else
         {
             m.ReturnValue = Address32.TryParse32((string)m.Arguments[0], out addr);
         }
         m.Arguments[1] = addr;
     }).Return(false);
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:26,代码来源:ProjectSerializerTests.cs


示例10: Build

		public SystemService Build(IProcessorArchitecture arch)
		{
			SystemService svc = new SystemService();
			svc.Name = Name;
			svc.SyscallInfo = new SyscallInfo();
			svc.SyscallInfo.Vector = Convert.ToInt32(SyscallInfo.Vector, 16);
			if (SyscallInfo.RegisterValues != null)
			{
				svc.SyscallInfo.RegisterValues = new RegValue[SyscallInfo.RegisterValues.Length];
				for (int i = 0; i < SyscallInfo.RegisterValues.Length; ++i)
				{
                    svc.SyscallInfo.RegisterValues[i] = new RegValue
                    {
                        Register = arch.GetRegister(SyscallInfo.RegisterValues[i].Register),
                        Value = Convert.ToInt32(SyscallInfo.RegisterValues[i].Value, 16),
                    };
				}
			}
			else
			{
				svc.SyscallInfo.RegisterValues = new RegValue[0];
			}
            TypeLibraryLoader loader = new TypeLibraryLoader(arch, true);
			ProcedureSerializer sser = arch.CreateProcedureSerializer(loader, "stdapi");
            svc.Signature = sser.Deserialize(Signature, arch.CreateFrame());
			svc.Characteristics = Characteristics != null ? Characteristics : DefaultProcedureCharacteristics.Instance;
			return svc;
		}
开发者ID:killbug2004,项目名称:reko,代码行数:28,代码来源:SerializedService.cs


示例11: Win_x86_64_Platform

 public Win_x86_64_Platform(IServiceProvider sp, IProcessorArchitecture arch)
     : base(sp, arch, "win64")
 {
     int3svc = new SystemService
     {
         SyscallInfo = new SyscallInfo
         {
             Vector = 3,
             RegisterValues = new RegValue[0],
         },
         Name = "int3",
         Signature = FunctionType.Action(new Identifier[0]),
         Characteristics = new ProcedureCharacteristics(),
     };
     int29svc = new SystemService
     {
         SyscallInfo = new SyscallInfo
         {
             Vector = 0x29,
             RegisterValues = new RegValue[0]
         },
         Name = "__fastfail",
         Signature = FunctionType.Action(
                     new Identifier("ecx", PrimitiveType.Word32, Registers.ecx)),
         Characteristics = new ProcedureCharacteristics
         {
             Terminates = true
         }
     };
 }
开发者ID:relaxar,项目名称:reko,代码行数:30,代码来源:Win_x86_64_Platform.cs


示例12: Given_ArchitectureStub

 private void Given_ArchitectureStub()
 {
     arch = mr.DynamicMock<IProcessorArchitecture>();
     var procSer = mr.StrictMock<ProcedureSerializer>(null, null, null);
     arch.Stub(a => a.CreateProcedureSerializer(null, null)).IgnoreArguments().Return(procSer);
     procSer.Stub(p => p.Deserialize(null, null)).IgnoreArguments().Return(new ProcedureSignature());
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:7,代码来源:TypeLibraryLoaderTests.cs


示例13: Arm32ProcedureSerializer

 public Arm32ProcedureSerializer(
     IProcessorArchitecture arch,
     ISerializedTypeVisitor<DataType> typeLoader, 
     string defaultConvention) 
     : base(arch, typeLoader, defaultConvention)
 {
 }
开发者ID:uxmal,项目名称:reko,代码行数:7,代码来源:ArmProcedureSerializer.cs


示例14: Setup

 public void Setup()
 {
     mr = new MockRepository();
     program = new Program();
     proc = new Procedure("testProc", new Frame(PrimitiveType.Word32));
     block = proc.AddBlock("l00100000");
     trace = new RtlTrace(0x00100000);
     r0 = new Identifier("r0", PrimitiveType.Word32, new RegisterStorage("r0", 0, 0, PrimitiveType.Word32));
     r1 = new Identifier("r1", PrimitiveType.Word32, new RegisterStorage("r1", 1, 0, PrimitiveType.Word32));
     r2 = new Identifier("r2", PrimitiveType.Word32, new RegisterStorage("r2", 2, 0, PrimitiveType.Word32));
     sp = new Identifier("sp", PrimitiveType.Word32, new RegisterStorage("sp", 15, 0, PrimitiveType.Word32));
     grf = proc.Frame.EnsureFlagGroup(Registers.eflags, 3, "SCZ", PrimitiveType.Byte);
     var sc = new ServiceContainer();
     var listener = mr.Stub<DecompilerEventListener>();
     scanner = mr.StrictMock<IScanner>();
     arch = mr.Stub<IProcessorArchitecture>();
     program.Architecture = arch;
     program.SegmentMap = new SegmentMap(
         Address.Ptr32(0x00100000),
         new ImageSegment(
             ".text",
             new MemoryArea(Address.Ptr32(0x00100000), new byte[0x20000]),
             AccessMode.ReadExecute));
     arch.Replay();
     program.Platform = new DefaultPlatform(null, arch);
     arch.BackToRecord();
     arch.Stub(s => s.StackRegister).Return((RegisterStorage)sp.Storage);
     arch.Stub(s => s.PointerType).Return(PrimitiveType.Pointer32);
     scanner.Stub(s => s.Services).Return(sc);
     sc.AddService<DecompilerEventListener>(listener);
 }
开发者ID:relaxar,项目名称:reko,代码行数:31,代码来源:BlockWorkitemTests.cs


示例15: PowerPcProcedureSerializer

 public PowerPcProcedureSerializer(
     IProcessorArchitecture  arch,
     ISerializedTypeVisitor<DataType> typeLoader,
     string defaultCc)
     : base(arch, typeLoader, defaultCc)
 {
     this.arch = arch;
 }
开发者ID:relaxar,项目名称:reko,代码行数:8,代码来源:PowerPcProcedureSerializer.cs


示例16: ElfObjectLinker

 public ElfObjectLinker(ElfLoader loader, IProcessorArchitecture arch, byte[] rawImage)
 {
     if (rawImage == null)
         throw new ArgumentNullException("rawImage");
     this.loader = loader;
     this.arch = arch;
     this.rawImage = rawImage;
 }
开发者ID:relaxar,项目名称:reko,代码行数:8,代码来源:ElfObjectLinker.cs


示例17: CreateAssumedRegisterValuesDialog

 public IAssumedRegisterValuesDialog CreateAssumedRegisterValuesDialog(
     IProcessorArchitecture arch)
 {
     return new AssumedRegisterValuesDialog
     {
         Architecture = arch,
     };
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:8,代码来源:WindowsFormsDialogFactory.cs


示例18: Given_i386_Architecture

 private void Given_i386_Architecture()
 {
     this.arch_386 = mr.StrictMock<IProcessorArchitecture>();
     arch_386.Stub(a => a.CreateFrame()).Return(new Frame(PrimitiveType.Pointer32));
     arch_386.Stub(a => a.WordWidth).Return(PrimitiveType.Word32);
     var state = mr.Stub<ProcessorState>();
     arch_386.Stub(a => a.CreateProcessorState()).Return(state);
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:8,代码来源:PeImageLoaderTests.cs


示例19: Load

 public Platform Load(IServiceProvider services, IProcessorArchitecture arch)
 {
     var type = Type.GetType(TypeName);
     if (type == null)
         throw new TypeLoadException(
             string.Format("Unable to load {0} environment.", Description));
     return (Platform) Activator.CreateInstance(type, services, arch);
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:8,代码来源:OperatingEnvironmentElement.cs


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IProduct类代码示例发布时间:2022-05-24
下一篇:
C# IProcessingContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap