protected void Opcode(uint Opcode) { Thread.Memory.WriteUInt32(Position, Opcode); if (UnicornAvailable) { UnicornEmu.MemoryWrite32((ulong)Position, Opcode); } Position += 4; }
protected void Opcode(uint opcode) { _memory.Write(_currAddress, opcode); if (_unicornAvailable) { _unicornEmu.MemoryWrite32(_currAddress, opcode); } _currAddress += 4; }
protected void Opcode(uint opcode) { _thread.Memory.WriteUInt32(Position, opcode); if (_unicornAvailable) { _unicornEmu.MemoryWrite32((ulong)Position, opcode); } Position += 4; }
public void Add() { UnicornAArch64 unicorn = new UnicornAArch64(); unicorn.MemoryMap(0x1000, 0x4000000, MemoryPermission.READ | MemoryPermission.EXEC | MemoryPermission.WRITE); unicorn.X[1] = 1; unicorn.X[2] = 2; unicorn.PC = 0x1004; Assert.True(unicorn.X[1] == 1); Assert.True(unicorn.X[2] == 2); Assert.True(unicorn.PC == 0x1004); unicorn.DumpMemoryInformation(); unicorn.MemoryWrite32(0x1004, 0x8b020020); // ADD X0, X1, X2 unicorn.MemoryWrite32(0x1008, 0x14000000); // B . unicorn.Step(); Assert.True(unicorn.X[0] == 3); Assert.True(unicorn.PC == 0x1008); }