public Enumerator(Dictionary <int, RegisterStorage> regs, ThumbRewriterRetired outer) { this.bytes = outer.rdr.Bytes; ulong addr = outer.rdr.Address.ToLinear(); this.hBytes = GCHandle.Alloc(bytes, GCHandleType.Pinned); this.m = new RtlEmitter(new List <RtlInstruction>()); this.ntf = new NativeTypeFactory(); this.rtlEmitter = new NativeRtlEmitter(m, ntf, outer.host); this.host = new ArmNativeRewriterHost(regs, outer.binder, outer.host, this.ntf, rtlEmitter); this.iRtlEmitter = GetCOMInterface(rtlEmitter, IID_IRtlEmitter); this.iNtf = GetCOMInterface(ntf, IID_INativeTypeFactory); this.iHost = GetCOMInterface(host, IID_INativeRewriterHost); this.native = outer.nArch.CreateRewriter( hBytes.AddrOfPinnedObject(), bytes.Length, (int)outer.rdr.Offset, addr, rtlEmitter, ntf, host); }
public void Setup() { this.instrs = new List <RtlInstruction>(); this.rtlc = new RtlInstructionCluster(Address.Ptr32(0x00123400), 4); this.ntf = new NativeTypeFactory(); this.m = new NativeRtlEmitter(new RtlEmitter(instrs), ntf, null); }
public ArmNativeRewriterHost(Dictionary <int, RegisterStorage> regs, IStorageBinder frame, IRewriterHost host, NativeTypeFactory ntf, NativeRtlEmitter m) { Debug.Assert(regs != null); this.regs = regs; this.coprocregs = new Dictionary <int, RegisterStorage>(); this.frame = frame; this.host = host; this.ntf = ntf; this.m = m; }