/// <summary> /// Starts emulation at the specified begin address, end address, timeout and number of instructions to execute. /// </summary> /// <param name="begin">Address at which to begin emulation.</param> /// <param name="end">Address at which to end emulation.</param> /// <param name="timeout">Duration to run emulation.</param> /// <param name="count">Number of instructions to execute.</param> /// <exception cref="UnicornException">Unicorn did not return <see cref="UnicornError.Ok"/>.</exception> /// <exception cref="ObjectDisposedException"><see cref="Emulator"/> instance is disposed.</exception> public void Start(ulong begin, ulong end, TimeSpan timeout, int count) { ThrowIfDisposed(); var microSeconds = (ulong)Math.Round(timeout.TotalMilliseconds * 1000); Bindings.EmuStart(Handle, begin, end, microSeconds, count); }
/// <summary> /// Starts emulation at the specified begin address, end address, timeout and number of instructions /// to execute. /// </summary> /// <param name="begin">Address at which to begin emulation.</param> /// <param name="end">Address at which to end emulation.</param> /// <param name="timeout">Duration to run emulation.</param> /// <param name="count">Number of instructions to execute.</param> /// <exception cref="UnicornException">Unicorn did not return <see cref="Bindings.Error.Ok"/>.</exception> /// <exception cref="ObjectDisposedException"><see cref="Emulator"/> instance is disposed.</exception> public void Start(ulong begin, ulong end, TimeSpan timeout, int count) { CheckDisposed(); // Convert TimeSpan value into micro seconds. var microSeconds = (ulong)(Math.Round(timeout.TotalMilliseconds * 1000)); Bindings.EmuStart(begin, end, microSeconds, count); }
/// <summary> /// Starts emulation at the specified begin address and end address. /// </summary> /// <param name="begin">Address at which to begin emulation.</param> /// <param name="end">Address at which to end emulation.</param> /// <exception cref="UnicornException">Unicorn did not return <see cref="UnicornError.Ok"/>.</exception> /// <exception cref="ObjectDisposedException"><see cref="Emulator"/> instance is disposed.</exception> public void Start(ulong begin, ulong end) { ThrowIfDisposed(); Bindings.EmuStart(Handle, begin, end, 0, 0); }
/// <summary> /// Starts emulation at the specified begin address and end address. /// </summary> /// <param name="begin">Address at which to begin emulation.</param> /// <param name="end">Address at which to end emulation.</param> /// <exception cref="UnicornException">Unicorn did not return <see cref="Bindings.Error.Ok"/>.</exception> /// <exception cref="ObjectDisposedException"><see cref="Emulator"/> instance is disposed.</exception> public void Start(ulong begin, ulong end) { CheckDisposed(); Bindings.EmuStart(begin, end, 0, 0); }
/// <summary> /// Starts emulation at the specified begin address and end address. /// </summary> /// <param name="begin">Address at which to begin emulation.</param> /// <param name="until">Address at which to end emulation.</param> /// <exception cref="UnicornException">Unicorn did not return <see cref="UnicornError.Ok"/>.</exception> /// <exception cref="ObjectDisposedException"><see cref="Emulator"/> instance is disposed.</exception> public void Start(ulong begin, ulong until) { ThrowIfDisposed(); Bindings.EmuStart(Handle, begin, until, 0, UIntPtr.Zero); }