internal Context(Emulator emulator) { Debug.Assert(emulator != null); emulator.Bindings.ContextAlloc(emulator.Handle, ref _context); _arch = emulator._arch; _mode = emulator._mode; _emulator = emulator; }
/// <summary> /// Initializes a new instance of the <see cref="Emulator"/> class with the specified <see cref="IBindings"/> /// instance. /// </summary> internal Emulator(UnicornArch arch, UnicornMode mode, IBindings bindings) { _arch = arch; _mode = mode; _registers = new Registers(this); _memory = new Memory(this); _hooks = new Hooks(this); Bindings = bindings; Bindings.Open(arch, mode, ref _handle); }
public void Open(UnicornArch arch, UnicornMode mode, ref IntPtr uc) => ThrowIfError(uc_open((uc_arch)arch, (uc_mode)mode, ref uc));
/// <summary> /// Initializes a new instance of the <see cref="Emulator"/> class with the specified <see cref="UnicornArch"/> /// and <see cref="UnicornMode"/>. /// </summary> /// <param name="arch"><see cref="UnicornArch"/> to use.</param> /// <param name="mode"><see cref="UnicornMode"/> to use.</param> public Emulator(UnicornArch arch, UnicornMode mode) : this(arch, mode, Unicorn.Bindings.Instance) { /* Space */ }
public static extern UnicornError uc_open(UnicornArch arch, UnicornMode mode, out IntPtr uc);